What does the expression 'system (' pause ')' do?

0

What is the command for?

system("pause");

?

    
asked by anonymous 11.12.2018 / 17:54

2 answers

7

The system() function calls the operating system console (if it is no longer running) and executes a command in this application. In case you are calling the command pause of the operating system that will make the console wait for a key and consequently your application will wait for it too.

This is used to not let a quick test close. When using the command line to compile is not usually necessary, the use is for those who used to make use of IDE. It is recommended to use another mechanism that does not need to invoke the operating system to obtain the same effect, although in most cases it does not make any difference ..

    
11.12.2018 / 18:00
-1

Basically the system ("pause") will show what is being done in the program, without it, the program would run without pause

    
17.12.2018 / 11:11