0
How can you stop the program when you need to?
I'm coding a calculator and I need to stop the program until the user press a key
2 Réponses
+ 1
what IDE are you using...
if its visual studio then include conio.h
and use this function like this
char a;
...
a=_getch ();
...
this function 'pauses' the program and take the char value as you press a key.
use getch () instead if you use other IDEs.
0
you can use a switch statement for the users input and if a certain key is entered or pressed call for the application to exit