It was easy to do a non-numerical value check, and it displays the error. The thing I'm having trouble with is when the Enter key is hit it does not display the error just waits for another input. Here is the code:
int x;
std::cout << "\nEnter level:\n";
if(!(std::cin >> x))
{
std::cout << "Error";
return ();
}
else
std::cout << "You have entered: " << x;
return(0);