How can I determine the number of written lines in a file? Could anyone help? Thanks
How can I determine the number of written lines in a file? Could anyone help? Thanks
Simple:
string str;
ifstream fin(FILE);
int linecount = 0;
while (fin.good()) {
getline(fin,str);
++linecount;
}
That's it.