Executing the command:
./program < input.txt
with the following code checking:
string input; while(cin) { getline(cin,
How about this:
string input; while(getline(cin, input)) { //do something with input... }