8 answers
I don’t quite understand what you mean. But test:
Otherwise, when you run your program, there is no need to close the window since it closes on its own at the end of the program. (Unless you launch from the console, but in that case it will annoy the user if it closes).
So the cleanest is simply to quit the program with a simple: return 0;
Best regards
--
Google is your friend
system("exit"); Otherwise, when you run your program, there is no need to close the window since it closes on its own at the end of the program. (Unless you launch from the console, but in that case it will annoy the user if it closes).
So the cleanest is simply to quit the program with a simple: return 0;
Best regards
--
Google is your friend
sohaib
Thank you very much
I don’t understand what you want to do. I think it’s impossible.
tell us the exact behavior you expect and what you want to do.
--
Salutation ! When we don’t know, we don’t touch!JBT
Char Snipeur
tell us the exact behavior you expect and what you want to do.
--
Salutation ! When we don’t know, we don’t touch!JBT
Char Snipeur
Sorry to bump this old topic, but better not to recreate one ^^, I have the same problem as the person who posted it. In a party, he tries to program in C (from what I understood), and in his code he is looking for a system that allows quitting the console automatically. He took as an example system("PAUSE") which lets the program pause.
I have the same problem as him; indeed, I’m a beginner, I started yesterday, I’m following a tutorial to help me program, and the first TP consists of creating a +/- , my problem being, in the menu I’d like to have the option to start or quit ... I don’t know the command that allows closing the console <system ...=""> <=== there you go ^^ it’s not clearer, if someone could help ... :s</system>
I have the same problem as him; indeed, I’m a beginner, I started yesterday, I’m following a tutorial to help me program, and the first TP consists of creating a +/- , my problem being, in the menu I’d like to have the option to start or quit ... I don’t know the command that allows closing the console <system ...=""> <=== there you go ^^ it’s not clearer, if someone could help ... :s</system>
thank you ^^ system("exit") doesn’t work, but in the end, I just needed a method to go to the end of the program, or to finish the program => return 0; SIMPLY thank youuuuuuuuuu ^^, I’m sorry, I started yesterday so, it’s not all this easy for me yet!