ifstream in c++ ... more than one line in a single string
How can I assign more than one line from a simple text file or more than one word on a single line in a text file to one declared string?
Example... file.dat reads:
Sharky Forums
29 September 2002
I want to assign "Sharky Forums" from that file to a string named refName
ifstream inData;
string refName;
inData.open("file.dat")
inData >> refName;
How can I cause both words on the first line to be assigned to refName instead of just the first word, "Sharky" ??