• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

Closing the console

I have a console program. I would like an option to close it.
I want to do this from outside the main function. So, a simple
return will not due. How can I end it on command?
0
List244
Asked:
List244
  • 2
1 Solution
 
mrwad99Commented:
I think you could just call exit(-1);
0
 
List244Author Commented:
exit what header would that be a part of?
0
 
mrwad99Commented:
#include <windows.h>
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now