file output, wtf?

Ok, i have a weird problem with ofstream.when i type ...>>i>>endl;
it allways prints on the same line. How to make that ofstream would ignore everything and print the variable i on the end of the text, ex.:

string i = "lol";

file contents b4 running program:
aalskdfh
ALKSJDHdflas
asldkfhasnbne
ALKASLIV

file contents after running program:
aalskdfh
ALKSJDHdflas
asldkfhasnbne
ALKASLIV
lol

Please help!!!
Open with ios::app http://www.cplusplus.com/reference/iostream/ios_base/openmode/
BTW, it should be <<i<<endl;
Topic archived. No new replies allowed.