Hello, I have a little problem again. If I am using the unformatted input with the code:
string s;
while(!cin.eof())
{
getline(cin, s);
}
When the signal eof will be reached? Or how can I reach that signal, so the loop will stop? The whole program is a little bit longer, but misunderstanding for me is only on this line. Franjo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Going back to my textbook, cuz I have trouble keeping this straight, the DOS end of file condition can be simulated by pressing control-z and enter. (In UNIX its cntrl-d)
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I have a little problem again. If I am using the unformatted input with the code:
string s;
while(!cin.eof())
{
getline(cin, s);
}
When the signal eof will be reached? Or how can I reach that signal, so the loop will stop? The whole program is a little bit longer, but misunderstanding for me is only on this line. Franjo
Going back to my textbook, cuz I have trouble keeping this straight, the DOS end of file condition can be simulated by pressing control-z and enter. (In UNIX its cntrl-d)
Wayne