Hello,
I'm trying to idiot-proof my program and I can't seem to figure out one part. I want to input integers for a menu system, but I get thrown into an infinite loop whenever somebody inputs a character or a string to the console. How can I stop this from happening?
I've been trying to use cin.fail() but I can't get the stream to clear back out again. Is there a reliable way to handle a problem like this?