Hi,
Please help...
I am trying to read in a file in C++ and when I use getline I am not able to read in the last line when the last line in the input file does not have a newline (\n) at the end. How do I do this?
I am reading a file with getline as such:
if (file.is_open())
{
//get first line
getline (file,line);
//do something - write output
}