Here is the code which will help me to print the last three lines of a file:
f1.seekg(-cnt,ios::end);//take the get pointer to the last character in the file
The input file is:
\n represents newline
I am unable to understand why two “here”'s are appearing in between two lines. On trying from the start of the file to the end it is giving me correct output…Please do help me!!!