I wish to read the last line of a .csv file without having to read the entire file (they're quite long). The only way I could think to do it is like this:
That seems to work fine but I have read that you're not supposed to use seekg with text files so I don't know if this code is good or not.
int main(int argc, char *argv)
streamoff offset = -2;
} while (ch != '\n');
cout << szLastLine << endl;
Is this code okay and if not is there a better solution?
Thanks for any help you can offer.