Posted by Charly on 03:33:00 10-11-2001
does anybody know the difference between ifstream and ofstream?
If you want to print the content of a file to the screen, modify it and print it again to the screen, what do you have to do?
is that right?
ifstream to print to screen
close it,
ofstream to print into file
close it
ofstream to print to screen
close it
thnx Charly
Posted by SilentStrike on 04:49:00 10-11-2001
istream = input stream
ostream = output stream
ifstream = input file stream, a type of istream
ofstream = output file stream, a type of ostream
Thus, when you want to read something from a file you use an ifstream. When you want to output to a file, you use ofstream.
Posted by Charly on 04:58:00 10-11-2001
thnx for your fast answer. That helped me pretty much.
btw. fabs Kagez and I are at shool and coding right now. I think Kagez is gonna go in the irc-channel in a few mins.
Posted by Charly on 05:07:00 10-11-2001
at least he'll try...
what's the difference between ios::app and ios::ate.
What do I have to do to access some designated line in a .txt-file and replace that line by an array?