The window which you probably see while the program runs and which has made you ask this question is not part of the program itself but part of the environment in which the program runs.Ī typical console program, however, must not assume details about the environment in which it is executed. You do not need a code replacement for system("PAUSE"), because the code is the wrong place to solve the perceived problem.īeginners like to put system("PAUSE") or even a portable alternative like std::cin.get() at the end of a program because otherwise "the window disappears" as soon as the program ends. Assuming that you are indeed working on Windows, the worst thing about system("PAUSE") is that it betrays a fundamental misunderstanding of your operating system's architecture.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |