I've been looking for this on the internet for soooooo long. Is there a way you can press any key and it immediately stops the pause and carries on with executing the code but it doesn't show up the key you pressed on the screen (like system("pause"))?
People said cin.get()
and stuff like that, however, if I use that, I have to press any key AND it displays on the screen and you have to press enter after that.
Since you're referencing system("pause")
I guess you're using Windows, then you can use _getch
to wait for any key.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With