View Single Post
Old 28 October 2001, 00:00   #4
andreas
Zone Friend
 
Join Date: Jun 2001
Location: Germany
Age: 43
Posts: 5,858
Send a message via ICQ to andreas Send a message via AIM to andreas
A small tip...

Quote:
cout << "File name passed in = " << old_file_name << "\n";
cout << "Length of file name = " << ofn_length << "\n" ;
Don't use that C style "\n" in C++, use endl instead.
endl has the advantage of flushing the text buffer which can be very important for some console programs - a C++ program may tend to "hang" until next user input!

Thus...

cout << "File name passed in = " << old_file_name << endl;

is the same as

cout << "File name passed in = " << old_file_name;
cout.flush();

Happy coding!
andreas is offline  
 
Page generated in 0.07227 seconds with 9 queries