Oh. For that just say:
cin >> userInput;
if (!cin) {
cout << "NOTHING TO PROCESS\n";
break;
}
This still trips if you enter something other than an integer, but to be more specific means you'd have to read the input as a string then convert it to an integer. Ask your professor if he would rather you read input as a string or as an integer.
Hope this helps.