exiting program and function

This is a discussion on exiting program and function within the C++ Programming forums, part of the General Programming Boards category; if i am in a function and want to exit the program without returning to main, howz that possible?...

  1. #1
    jumpy
    Guest

    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
    Posts
    1,571
    Use the exit function. Prototyped like this:

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

  3. #3
    Registered User
    Join Date
    Dec 2002
    Posts
    103

    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, 12:45 PM
  2. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07: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, 06:06 PM
  5. qt help
    By Unregistered in forum Linux Programming
    Replies: 1
    Last Post: 04-20-2002, 10:51 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21