how can i get a program window to close? i'm using borland 3.5 and it keeps the window open, but inactive after the program runs... is there any code i can use to close it?
Printable View
how can i get a program window to close? i'm using borland 3.5 and it keeps the window open, but inactive after the program runs... is there any code i can use to close it?
A console program?
yeah... just a raw console... no GUI or anything... purely text-based...
exit(1) ???
lol
you can use exit, return, goto, or you can make it crash (not recommended).
Not recommended but effective.......:D
i've been using return, but i need something that will close the window... like i said, i'm using borland 3.5 and it adds code that I can't see to keep the window open after the program runs...
Thats a bit odd... Unless you ran the program from a DOS prompt, it should be closing it automatically after the program finishes.
Might want to check the compiler documentation. If you can shut down this 'feature', it'll probably be with a command line flag of some sort.
If you're running the program from an IDE, that might be the problem. I know that MSVC++ will make it so that after the program quits, it will say "Press any key to continue..." before quitting. However, when you run the actual program, it just quits (which is very annoying when all you do is cout something and quit - because then it quits before you see what was written to the screen.)
IIRC, borland doesn't run the executables in DOS, it's some sort of emulated (don't know if thats the right word) DOS in which it runs only that program. exit(1) should work.
^thanks... I really need to get a newer compiler...Quote:
Originally posted by the Wookie
IIRC, borland doesn't run the executables in DOS, it's some sort of emulated (don't know if thats the right word) DOS in which it runs only that program. exit(1) should work.