View Full Version : Exit to Dos in a C program from a Switch statement
sciconf
10-03-2006, 04:46 AM
If I want to exit to Dos in a C program from a Switch statement, how do I do it?
Thanks
Papabravo
10-03-2006, 12:06 PM
Generally speaking you look for a library function called exit(), or _exit() or some variation. You could also look for library functions like doscall() or int86() which give access to a variety of OS services.
Functions like exit() are kinda like the roach motel, they can be entered but the never return.
haditya
10-03-2006, 12:46 PM
i m kinda rusty..but i thinku can try break;it exits the loop..however exit(0) will exit the program altogether
vBulletin® v3.8.5, Copyright ©2000-2010, Jelsoft Enterprises Ltd.