1
In the following code, when I press 9 the program must close:
case 9:
exit(0);
After pressing 9 the screen below in cmd is displayed, but after pressing 9 is displayed the message: Press to close this window... and it is necessary to click a key again to close the cmd window. The question is, is there any command that directly closes the cmd window when pressing number 9?
If you open directly the application...will come out... only q if you are in cmd and open the application by it, why would you close the cmd ? and put all your code so we know what the program is really doing
– Rovann Linhalis
Is this C or C++? If it’s C++ is using Qtsdk to create the code? Because if it’s C++
QCoreApplication::exit(int returnCode);
or next to it (changing the int returnCode by the number that will represent the output, usually 0, thus:int main(int argc, char *argv[])
{
 QCoreApplication a(argc, argv);

 /* Usando algum sinal emitiria os "eventos" e executaria a.exit() */

 return a.exec();
}
)– Guilherme Nascimento