cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
file output, wtf?
file output, wtf?
Nov 27, 2009 at 4:28pm UTC
award982
(129)
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!!!
Nov 27, 2009 at 4:35pm UTC
Bazzy
(6281)
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.