Thanks. So what would be the most simple/beginner way to not allow a character? Without using try catch or anything.

I tried using something like
Code:
bool valid = true;
if(isalpha(a)) valid = false;

while(!valid)
{
   cout << enter a num\n";
   cin >> a;
}
That won't work either. It gives me a crazy runtime error.

The only reason i'm doing this is because someone who just started learning c++ asked me about this. It seemed really simple at first, but after playing around with the most basic ways I can think of, I cannot get it to work! What is the most simple way to handle a ?