Im trying to append data in a file by going to the last row of the file. Im reading data in with getline( *in, string); and then saving all data in those files on a row each.
Now, the problems start arising when I want to append data from a new object into that file.
If I use: in->open(filename.c_str(), ios::app|std::ios::out)
I will only arrive at the end of the 1ST row, and not the end of the last row Ive saved data to. Any tips on how I get to the end? :)
Sigh.... Its cause of another function Im using that is trying to take the first line after Ive read it all in and then update a number that is on the first line.
After reading abit on the web it seems that this is impossible, that I need to read the whole file again. This would mean I woud loose my \n dont it?