Thread: exiting program and function

  1. #1

    exiting program and function

    if i am in a function and want to exit the program without returning to main, howz that possible?

  2. #2
    Registered User
    Join Date
    Apr 2002
    Use the exit function. Prototyped like this:

    void exit( int status );
    Its in the standard library header.

  3. #3
    Registered User
    Join Date
    Dec 2002

    The standard library is

    #include <stdlib.h> // old c style include
    #include <cstdlib> // current c++ style include
    Have a wonderful day.... and keep smiling... you look terrific that way
    signing off...
    shiv... as i know him

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  2. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  3. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. qt help
    By Unregistered in forum Linux Programming
    Replies: 1
    Last Post: 04-20-2002, 09:51 AM