When testing our programs, my professor always tells us to input 123abc or ^Z (ctrl + z) or something along those lines.
I understand input validating regular integers, like making sure they're not negative or something simple like that.
I'm getting confused when he throws these inputs with multiple data types in them. What is a good process for validating these kinds of inputs?
All I'd like to do is if it contains more than 1 character (ie. 123abc or 1b or 7m32 etc...) is just display an error message. I only want to accept 1, 2, 3, or 4.
Here's an example of my cin statement and the error check I have so far