When using the getline function, what do I need to do to to get line 1 and then again to get line 2?
If I'm reading in a file with two lines.
string filename;
cout << "Enter filename: "
cin >> filename;
cout << filename << endl;
infile.open(filename.c_str())
?
?
?
Lines 4 and 5 of the snippet I posted, change cin to infile.