Hi, inspired with my recent problems and some other post I found on boards I need explanation for this:
I test this program by entering following:Code:#include<iostream> using namespace std; int main() { int x; while (cin>>x) { } return 0; }
1 2 3 4 5 ^Z
all in one line delimited with spaces, and loop doesn't exit.
Strange. I use Dev-Cpp compiler.
Again I test with the following
1 2 3 4 5 ^T
where ^T is (Ctrl+T)
end program exits.
Can someone test on other compiler an let me know if the behavior is same or not?
Why loop and program exit when found Ctrl+T in input stream and not Ctrl+Z when it is supposed to be EOF in windows (I use win XP)?
Thanks
- Micko