T
TechNovice
Hi:
I'm trying to find a way to test input values.
To test an integer I tried this code:
******Code******
int input_number;
cin>>input_number;
while(!input_number)
cout<<"invalid input"<<endl;
******End Code******
when I enter a character or a string I don't get the error message. I would
appreciate if someone could help me solve this problem.
Thanks.
I'm trying to find a way to test input values.
To test an integer I tried this code:
******Code******
int input_number;
cin>>input_number;
while(!input_number)
cout<<"invalid input"<<endl;
******End Code******
when I enter a character or a string I don't get the error message. I would
appreciate if someone could help me solve this problem.
Thanks.