Originally Posted by
twilight
hmm... ok. I have thought of that, too. But could not figure out how.
istream is just for inputing files from harddrive to my program, right? ofstream is just for outputting files from program to harddrive. Whereas fstream should be doing both as well as append, as far as I know?!
Also, could I open a file and pass it from one function to another? I guess not because my object only has function-scope, when I open it in one function, right?
So the only thing I could do is to open it once instead of twice in my appendto_file()-function.
I can't use ofstream for that, I can't use ifstream for that. So I would fstream? What about fopen you mentioned? I am somewhat limitted to what I know from the 2 tutorials so far, fopen was not covered yet. How is the usage, any reference?