I am reading a text file line by line in C++. I'm using this code:
while (inFile)
{
getline(inFile,oneLine);
}
This is a text file:
-------
This file is a test to see
how we can reverse the words
on one line.
Let's see how it works.
Here's a long one with a quote from The Autumn of the Patriarch. Let's see if I can say it all in one breath and if your program can read it all at once:
Another line at the end just to test.
-------
The problem is I can read only the paragraph starts with "Here's a long etc..." and it stops "at once:" I couldn't solve to read all text. Do you have any suggestion?