Click here to Skip to main content
15,908,931 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CoCreateInstance fail for 64 bit Pin
Richard MacCutchan20-Feb-13 23:58
mveRichard MacCutchan20-Feb-13 23:58 
GeneralRe: CoCreateInstance fail for 64 bit Pin
john563221-Feb-13 0:45
john563221-Feb-13 0:45 
GeneralRe: CoCreateInstance fail for 64 bit Pin
Richard MacCutchan21-Feb-13 1:19
mveRichard MacCutchan21-Feb-13 1:19 
GeneralRe: CoCreateInstance fail for 64 bit Pin
Jochen Arndt21-Feb-13 0:53
professionalJochen Arndt21-Feb-13 0:53 
GeneralRe: CoCreateInstance fail for 64 bit Pin
Chris Losinger22-Feb-13 4:14
professionalChris Losinger22-Feb-13 4:14 
QuestionCursor from Bitmap Conundrum Pin
Ben Aldhouse20-Feb-13 21:36
Ben Aldhouse20-Feb-13 21:36 
QuestionHow Print multiple copies with printdlg in MFC Pin
haha_c20-Feb-13 21:06
haha_c20-Feb-13 21:06 
AnswerRe: How Print multiple copies with printdlg in MFC Pin
Richard MacCutchan20-Feb-13 21:13
mveRichard MacCutchan20-Feb-13 21:13 
GeneralRe: How Print multiple copies with printdlg in MFC Pin
haha_c20-Feb-13 21:54
haha_c20-Feb-13 21:54 
GeneralRe: How Print multiple copies with printdlg in MFC Pin
Richard MacCutchan20-Feb-13 22:39
mveRichard MacCutchan20-Feb-13 22:39 
GeneralRe: How Print multiple copies with printdlg in MFC Pin
haha_c20-Feb-13 23:31
haha_c20-Feb-13 23:31 
QuestionLoad an image dynamically in win32 using VC++ Pin
Sachin k Rajput 20-Feb-13 20:05
Sachin k Rajput 20-Feb-13 20:05 
AnswerRe: Load an image dynamically in win32 using VC++ Pin
_AnsHUMAN_ 20-Feb-13 20:56
_AnsHUMAN_ 20-Feb-13 20:56 
AnswerRe: Load an image dynamically in win32 using VC++ Pin
Richard MacCutchan20-Feb-13 22:32
mveRichard MacCutchan20-Feb-13 22:32 
GeneralRe: Load an image dynamically in win32 using VC++ Pin
Sachin k Rajput 21-Feb-13 0:27
Sachin k Rajput 21-Feb-13 0:27 
GeneralRe: Load an image dynamically in win32 using VC++ Pin
Richard MacCutchan21-Feb-13 1:14
mveRichard MacCutchan21-Feb-13 1:14 
AnswerRe: Load an image dynamically in win32 using VC++ Pin
Shaheed Legion26-Feb-13 5:10
Shaheed Legion26-Feb-13 5:10 
QuestionWhy does so many companies use directUI to show GUI ? Pin
yu-jian20-Feb-13 15:09
yu-jian20-Feb-13 15:09 
QuestionCFileDialog in Dll Project Pin
LeeUnSong20-Feb-13 14:38
LeeUnSong20-Feb-13 14:38 
AnswerRe: CFileDialog in Dll Project Pin
Richard MacCutchan20-Feb-13 21:10
mveRichard MacCutchan20-Feb-13 21:10 
GeneralRe: CFileDialog in Dll Project Pin
LeeUnSong21-Feb-13 0:31
LeeUnSong21-Feb-13 0:31 
GeneralRe: CFileDialog in Dll Project Pin
Richard MacCutchan21-Feb-13 1:16
mveRichard MacCutchan21-Feb-13 1:16 
QuestionFormatting Output Pin
Sarah Trattner20-Feb-13 12:02
Sarah Trattner20-Feb-13 12:02 
AnswerRe: Formatting Output Pin
Garth J Lancaster20-Feb-13 12:33
professionalGarth J Lancaster20-Feb-13 12:33 
GeneralRe: Formatting Output Pin
Sarah Trattner20-Feb-13 13:00
Sarah 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

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.