- 1

How to make the window pause [Not a question]

By this I mean to make the window to wait for the enter/return key. Simply on the line before "return 0;" type "system("pause");"

24th Feb 2017, 12:13 AM
PortillTech
PortillTech - avatar
1 Réponse
+ 1
This is only true for Windows based operating systems. Additionally, it doesn't have to come before the return from main, it could be introduced anywhere. Nevertheless, it is good practice to avoid using any system commands in your programs, not just for compatibility, but also security reasons.
9th Jun 2017, 10:27 AM
Cohen Creber
Cohen Creber - avatar