Hi all
I am learning C++ and I want to restrict users to input only valid data.for example:
int age;
cout<<"Enter age: ";
cin>>age;
now it should be an integer but what if user input a character like a,b,c etc.so now u understand what I mean?restricting users.any help?




Reply With Quote