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:
Anandtech Forums
29 September 2002
I want to assign "Anandtech 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, "Anandtech" ??
Example... file.dat reads:
Anandtech Forums
29 September 2002
I want to assign "Anandtech 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, "Anandtech" ??