|
quick question on fstream
Hey, I need to open a file in my newest program. I need it to simulate the log on of an operating system. It needs to read in a database of usernames and then output any attempts to log in, either allowed or denied.
My problem is that when I restart my program, it rewrites the entire output file. I need it to read the output, and stop right before the eof().
I tried using
while(!outfile.eof())
outfile >> junk;
but that brings me all the way to the end of file and won't write any more. Any ideas?
|