Click here to Skip to main content
12,500,915 members (54,636 online)

C / C++ / MFC

 
QuestionLoad an image dynamically in win32 using VC++ Pin
toms from newdelhi20-Feb-13 20:05
membertoms from newdelhi20-Feb-13 20:05 
AnswerRe: Load an image dynamically in win32 using VC++ Pin
_AnsHUMAN_ 20-Feb-13 20:56
group_AnsHUMAN_ 20-Feb-13 20:56 
AnswerRe: Load an image dynamically in win32 using VC++ Pin
Richard MacCutchan20-Feb-13 22:32
mvpRichard MacCutchan20-Feb-13 22:32 
GeneralRe: Load an image dynamically in win32 using VC++ Pin
toms from newdelhi21-Feb-13 0:27
membertoms from newdelhi21-Feb-13 0:27 
GeneralRe: Load an image dynamically in win32 using VC++ Pin
Richard MacCutchan21-Feb-13 1:14
mvpRichard MacCutchan21-Feb-13 1:14 
AnswerRe: Load an image dynamically in win32 using VC++ Pin
Max_Power_Up26-Feb-13 5:10
memberMax_Power_Up26-Feb-13 5:10 
QuestionWhy does so many companies use directUI to show GUI ? Pin
yu-jian20-Feb-13 15:09
groupyu-jian20-Feb-13 15:09 
QuestionCFileDialog in Dll Project Pin
LeeUnSong20-Feb-13 14:38
memberLeeUnSong20-Feb-13 14:38 
AnswerRe: CFileDialog in Dll Project Pin
Richard MacCutchan20-Feb-13 21:10
mvpRichard MacCutchan20-Feb-13 21:10 
GeneralRe: CFileDialog in Dll Project Pin
LeeUnSong21-Feb-13 0:31
memberLeeUnSong21-Feb-13 0:31 
GeneralRe: CFileDialog in Dll Project Pin
Richard MacCutchan21-Feb-13 1:16
mvpRichard MacCutchan21-Feb-13 1:16 
QuestionFormatting Output Pin
Sarah Trattner20-Feb-13 12:02
memberSarah Trattner20-Feb-13 12:02 
AnswerRe: Formatting Output Pin
Garth J Lancaster20-Feb-13 12:33
memberGarth J Lancaster20-Feb-13 12:33 
GeneralRe: Formatting Output Pin
Sarah Trattner20-Feb-13 13:00
memberSarah Trattner20-Feb-13 13:00 
Thank you this is what I was asking, just a start because I have litterally never written code in C++ only pseudocode. I am just trying to put together how each line will appear. He provided the entire program we have to fill in our solution. Here, I'll show you...

Exercise 3:
Objectives: using the iomanip library to format screen output.

Complete the provided main() program with statements to accomplish each of the following. In each case you must use the appropriate I/O stream manipulators to produce the appropriate output wherever possible. Refer to the sample output below as a guide for proper output alignment.

Output first first as an integer value, followed by a space, then in its written form.
Output second as a base ten value, followed by a space, then as a hexadecimal value, followed by a space, then as an octal value. Make sure the appropriate base indicator prefix is shown in the output.
Output third.
Output fourth with four digits, with the sign shown at the left, and the value right aligned. The decimal point must also appear.
Output fourth with four significant figures.
Output fifth with seven significant figures. (Must be left-aligned)
Output fifth with three digits to the right of the decimal point.
Output third.
Output fourth with two digits to the right of the decimal point.
Output sixth with no decimal portion showing
Output fourth with eight digits to the right of the decimal point.
Output sixth with six digits.
You must start your coding by using exactly the following program. You may not modify it, except to add the required code between the Solution starts, and Solution ends comments.

#include <iostream>
#include <iomanip>
using namespace std;
int
main()
{
bool first;
int second;
long third;
float fourth;
float fifth;
double sixth;

cout << "Enter bool, int, long, float, float, and double values: ";
cin >> first >> second >> third >> fourth >> fifth >> sixth;
cout << endl;

// ***** Solution starts here ****

// ***** Solution ends here ****

cin.get();
return 0;
}
SAMPLE PROGRAM OUTPUT (assume user inputs values shown in bold):
Enter bool, int, long, float, float, and double values:
1 69 1464878 6443.39 -7.273 -6443.39
1 true
69 0x45 0105
1464878
+ 6443.
6.4434e+03
-7.2729998e+00
-7.273
1464878
6443.39
-6443
6443.39013672
-6443.39
GeneralRe: Formatting Output Pin
Garth J Lancaster20-Feb-13 13:26
memberGarth J Lancaster20-Feb-13 13:26 
GeneralRe: Formatting Output Pin
Garth J Lancaster20-Feb-13 13:37
memberGarth J Lancaster20-Feb-13 13:37 
QuestionBOM Code Pin
Michael Haephrati מיכאל האפרתי20-Feb-13 10:41
mvpMichael Haephrati מיכאל האפרתי20-Feb-13 10:41 
SuggestionRe: BOM Code Pin
DavidCrow20-Feb-13 10:47
memberDavidCrow20-Feb-13 10:47 
GeneralRe: BOM Code Pin
Michael Haephrati מיכאל האפרתי20-Feb-13 10:49
mvpMichael Haephrati מיכאל האפרתי20-Feb-13 10:49 
QuestionOn displaying two images second image overlapps first image Pin
toms from newdelhi20-Feb-13 0:32
membertoms from newdelhi20-Feb-13 0:32 
AnswerRe: On displaying two images second image overlapps first image Pin
Richard MacCutchan20-Feb-13 2:40
mvpRichard MacCutchan20-Feb-13 2:40 
AnswerRe: On displaying two images second image overlapps first image Pin
Michael Haephrati מיכאל האפרתי20-Feb-13 10:15
mvpMichael Haephrati מיכאל האפרתי20-Feb-13 10:15 
QuestionCFileDialog with preview working in Xp but not in Win7 Pin
yogeshs19-Feb-13 18:50
memberyogeshs19-Feb-13 18:50 
AnswerRe: CFileDialog with preview working in Xp but not in Win7 Pin
Richard MacCutchan19-Feb-13 22:10
mvpRichard MacCutchan19-Feb-13 22:10 
GeneralRe: CFileDialog with preview working in Xp but not in Win7 Pin
yogeshs19-Feb-13 22:46
memberyogeshs19-Feb-13 22:46 
GeneralRe: CFileDialog with preview working in Xp but not in Win7 Pin
Richard MacCutchan19-Feb-13 23:01
mvpRichard MacCutchan19-Feb-13 23:01 
GeneralRe: CFileDialog with preview working in Xp but not in Win7 Pin
yogeshs20-Feb-13 18:46
memberyogeshs20-Feb-13 18:46 
GeneralRe: CFileDialog with preview working in Xp but not in Win7 Pin
Richard MacCutchan20-Feb-13 21:06
mvpRichard MacCutchan20-Feb-13 21:06 
QuestionProblem Reading/Writing Registry in Windows 7? Pin
Member 919975419-Feb-13 9:40
memberMember 919975419-Feb-13 9:40 
AnswerRe: Problem Reading/Writing Registry in Windows 7? Pin
DavidCrow19-Feb-13 9:50
memberDavidCrow19-Feb-13 9:50 
GeneralRe: Problem Reading/Writing Registry in Windows 7? Pin
Member 919975419-Feb-13 13:10
memberMember 919975419-Feb-13 13:10 
GeneralRe: Problem Reading/Writing Registry in Windows 7? Pin
Peter_in_278019-Feb-13 20:48
memberPeter_in_278019-Feb-13 20:48 
GeneralRe: Problem Reading/Writing Registry in Windows 7? Pin
Member 919975420-Feb-13 6:27
memberMember 919975420-Feb-13 6:27 
AnswerRe: Problem Reading/Writing Registry in Windows 7? Pin
jschell20-Feb-13 8:11
memberjschell20-Feb-13 8:11 
GeneralRe: Problem Reading/Writing Registry in Windows 7? Pin
jeron120-Feb-13 8:14
memberjeron120-Feb-13 8:14 
GeneralRe: Problem Reading/Writing Registry in Windows 7? Pin
Member 919975420-Feb-13 16:31
memberMember 919975420-Feb-13 16:31 
AnswerRe: Problem Reading/Writing Registry in Windows 7? Pin
Max_Power_Up26-Feb-13 5:21
memberMax_Power_Up26-Feb-13 5:21 
QuestionUsing C++ TagLib, not TagLib Sharp - how to write APIC frames Pin
Steve S19-Feb-13 6:32
memberSteve S19-Feb-13 6:32 
AnswerRe: Using C++ TagLib, not TagLib Sharp - how to write APIC frames Pin
Steve S19-Feb-13 7:21
memberSteve S19-Feb-13 7:21 
Question[MFC] How to use the Picture Control to show jpg image? Pin
yu-jian19-Feb-13 4:26
groupyu-jian19-Feb-13 4:26 
AnswerRe: [MFC] How to use the Picture Control to show jpg image? Pin
jeron119-Feb-13 4:35
memberjeron119-Feb-13 4:35 
GeneralRe: [MFC] How to use the Picture Control to show jpg image? Pin
yu-jian20-Feb-13 16:32
groupyu-jian20-Feb-13 16:32 
AnswerRe: [MFC] How to use the Picture Control to show jpg image? Pin
Michael Haephrati מיכאל האפרתי20-Feb-13 10:20
mvpMichael Haephrati מיכאל האפרתי20-Feb-13 10:20 
Questionglut project Pin
abhi sharma19-Feb-13 2:02
memberabhi sharma19-Feb-13 2:02 
AnswerRe: glut project Pin
Richard MacCutchan19-Feb-13 3:06
mvpRichard MacCutchan19-Feb-13 3:06 
Questionexe fine in codeblocks Pin
abhi sharma19-Feb-13 1:54
memberabhi sharma19-Feb-13 1:54 
AnswerRe: exe fine in codeblocks Pin
Albert Holguin19-Feb-13 4:10
memberAlbert Holguin19-Feb-13 4:10 
QuestionRe: exe fine in codeblocks Pin
DavidCrow19-Feb-13 4:40
memberDavidCrow19-Feb-13 4:40 
QuestionWDK 7600.16385.1 Compiler Pin
msr_codeproject18-Feb-13 17:44
membermsr_codeproject18-Feb-13 17:44 
AnswerRe: WDK 7600.16385.1 Compiler Pin
Richard MacCutchan19-Feb-13 3:05
mvpRichard MacCutchan19-Feb-13 3:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160919.1 | Last Updated 24 Sep 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid