Problems with F6 button

Hi everyone.

I have a small issue with the F6 button during run time of a console program. If the user press F6 the output on the screen will show Z^ and if he press enter the program will crash by entering into an infinite loop.

Any suggestions how can I solve this issue?

Thanks in advance
Simplest solution; don't press F6.
HEHE:) Ok that is for sure a simple solution, but as you know, one of the aspects that makes a good program is that whatever the user presses on the keyboard, the program will not crash.

Now, in my program I managed to control the user input when it comes to insert numbers, letters and punctuation marks.

What I meant in my question was this, Is there some code that controls the usage of the function buttons like F6?

Thanks & regards
You should put error checking into your program. Never assume a read from std::cin will succeed.
Topic archived. No new replies allowed.