So I have been learning C++ for about 5~ weeks now or so, and I have created some simple programs such as a math problem generator.
http://pastebin.com/KHSwh49H Please excuse the messy code. ( Kind of a mix of code from somewhere I found online )
I've recently shown this to my friend and he was impressed. While playing around will it, he said, "I know how to crash your program."
And he proceed to enter the following in "sigkill" and It stops the program.
I was surprised that it worked and started searching online on how to fix this issue. There were 2 posts I saw that might help but the code they used was way too complicated for me to understand.
My friend claims he knows more "kill code."
Is there anyway I could prevent this from happening? I've tried to add in cin.clear() and cin.ignore() but It didn't work.