isdigit(int c)
Sorry for this, but i am new to c++.
I need to check if input is numeric, and was thinking to control this with the following code.
1 2 3 4 5 6
|
int b;
cin>>b;
if(isdigit(b))
cout<<"Is a digit!";
else
cout<<"Is not a digit!";
|
Cane somebody explain why this don't working correct.
Best Regards, Vic
Topic archived. No new replies allowed.