Home > Back-end >  C code to remove "press any key to continue" window
C code to remove "press any key to continue" window

Time:10-03

My code execution will be prompted to press any key to continue, at the end of the then card to the black box that, could you tell me where I don't want to let his card, want to let he automatically shut down the black box should be how to do?

CodePudding user response:

You compiled into executable files, run directly executable file will not have the card,
Have this card because you use the IDE the launcher, the IDE will appear by default the CARDS, some IDE can modify the default Settings, you find the program runs related configuration and see,

CodePudding user response:

This should be related to the compiler, vc + + 6.0 is the default console has a "press any key to continue," VS2015 console have no, black box a flash directly, if you don't want to let a black box. You can add
 system (" pause "); 

If you want the black box a flash, you can in the main () function to return zero; Prior to add
 system (" pause> Nul "); 

It is important to note that the use of the system () function, you need to add the header file
 # include & lt; stdlib.h> 
  • Related