Click here to Skip to main content
15,900,724 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: A strange debug error Pin
PJ Arends14-Sep-06 9:03
professionalPJ Arends14-Sep-06 9:03 
GeneralRe: A strange debug error Pin
Waldermort14-Sep-06 9:11
Waldermort14-Sep-06 9:11 
GeneralRe: A strange debug error Pin
Zac Howland14-Sep-06 9:36
Zac Howland14-Sep-06 9:36 
QuestionRe: A strange debug error Pin
David Crow14-Sep-06 8:50
David Crow14-Sep-06 8:50 
QuestionAdding a childwindow to an application other than my own Pin
beeejay14-Sep-06 7:48
beeejay14-Sep-06 7:48 
AnswerRe: Adding a childwindow to an application other than my own Pin
Hamid_RT15-Sep-06 7:20
Hamid_RT15-Sep-06 7:20 
QuestionATL Control Pin
Demian Panello14-Sep-06 6:21
Demian Panello14-Sep-06 6:21 
QuestionFormat Issue On Console Output From Text File !!! New To C++ Pin
Mark_Murphy14-Sep-06 6:20
Mark_Murphy14-Sep-06 6:20 
hi
need a little help as new to c++.
when i run the code below to save the names to a text file and then output the names back to the console application i have all the names together with no spaces.

eg: markjohnpeterjames

what i need to know is there a way to output the data from the txt file to the console but with spaces between the names ( or if you can play around with the output format in general ) or is it possible to save them to the text file in a particular format ?????
This one has me stuck !!!!!

Plus any sugestions for improvements on the code below will be much appreciated.



char xx [20];
ofstream fout;
fout.open("c:/out.txt", ios::app);
cout<< "Please enter your first name: \t";
cin>> xx;
fout<< xx;
// close file
fout.close();

char yy;
ifstream myfile("c:/out.txt");
cout<< "\nAll names entered on file: \t";
while (!myfile.eof())
{
myfile>> yy;
cout<< yy;
}

Thanks in advance !!!!

The problem with political jokes is they get elected.
AnswerRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Zac Howland14-Sep-06 7:41
Zac Howland14-Sep-06 7:41 
GeneralRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Mark_Murphy14-Sep-06 8:24
Mark_Murphy14-Sep-06 8:24 
GeneralRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Zac Howland14-Sep-06 9:05
Zac Howland14-Sep-06 9:05 
AnswerRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Eric Dahlvang14-Sep-06 8:20
Eric Dahlvang14-Sep-06 8:20 
GeneralRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Mark_Murphy14-Sep-06 8:29
Mark_Murphy14-Sep-06 8:29 
GeneralRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Mark_Murphy14-Sep-06 9:09
Mark_Murphy14-Sep-06 9:09 
GeneralRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Eric Dahlvang14-Sep-06 9:20
Eric Dahlvang14-Sep-06 9:20 
GeneralRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Mark_Murphy14-Sep-06 9:36
Mark_Murphy14-Sep-06 9:36 
GeneralRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Zac Howland14-Sep-06 9:39
Zac Howland14-Sep-06 9:39 
GeneralRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Mark_Murphy14-Sep-06 10:05
Mark_Murphy14-Sep-06 10:05 
GeneralRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Eric Dahlvang14-Sep-06 10:29
Eric Dahlvang14-Sep-06 10:29 
GeneralRe: Format Issue On Console Output From Text File !!! New To C++ Pin
Mark_Murphy14-Sep-06 11:45
Mark_Murphy14-Sep-06 11:45 
QuestionMiltiple CDocument & handle massage! Pin
mostafa_pasha14-Sep-06 5:55
mostafa_pasha14-Sep-06 5:55 
AnswerRe: Miltiple CDocument & handle massage! Pin
Jun Du14-Sep-06 7:06
Jun Du14-Sep-06 7:06 
GeneralRe: Miltiple CDocument & handle massage! Pin
mostafa_pasha14-Sep-06 8:58
mostafa_pasha14-Sep-06 8:58 
AnswerRe: Miltiple CDocument & handle massage! Pin
Sam Hobbs14-Sep-06 7:52
Sam Hobbs14-Sep-06 7:52 
AnswerRe: Miltiple CDocument & handle massage! Pin
PJ Arends14-Sep-06 8:39
professionalPJ Arends14-Sep-06 8: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.