Are you doing anything else in that while-loop? 'cause I can't see anything that would break the loop (with very limited c++ knowledge I might add)
edit: perhaps it's the variable type of 'x' that is causing the problem?
will the '>>' operator fail with an incorrect variable? (i.e. if x is declared as an int, will assigning a string fail, thus not moving the filepointer towards EOF, and retaining the original value of 'x'?)
__________________
"Do not kill. Do not rape. Do not steal. These are principles which every man of every faith can embrace. "
- Murphy MacManus (Boondock Saints)
Last edited by Silvy; 11-23-2004 at 02:59 AM..
|