quick question:

Hello all, and thanks for the help in the past. I am working on a program from last semester and cannot get finished still.

My question is:

when outputting to a file, using an ofstream object, how do I do a carriage return in the text file so each loop of input will be on new line?

Hard for me, easy for you... I'm new.

Thanks a lot,
Yost
 
'\n'


is a newline character, or, the C++ way is to use std::endl.

 
std::cout << "hello world" << std::endl << "This is on line 2";

Topic archived. No new replies allowed.