I have code that currently does something like the following:
ofstream fout;
fout.open("file.txt");
fout<<"blah blah "<<100<<","<<3.14;
//get ofstream length here
fout<<"write more stuff"<<endl;
Is there a convenient way to find out the length of that line that is written at the stage I specified above? (in real life, the int 100 and float 3.14 are not constant and can change). Is there a good way to do what I want?
EDIT: by length, I mean something that can be used using fseek, e.g.
fseek(pFile, -linelength, SEEK_END);