This is just a portion of my program and I want to trap the integer inputs using while loop.
1 2 3 4 5 6 7
|
cout<<"\nEnter the name : ";
while(/*integer input or not in character*/)
{
//Invalid Input!
}
cin.ignore();
cin.getline(name, 100);
| |
Last edited on