Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - abort http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   abort

   Usage
   #include <stdlib.h>
   void abort(void);

   Description
   The  abort function terminates the currently executing program. It  is
   the same as a function call to _exit with a non-zero status. abort can
   be  intercepted  using the signal SIGABRT (see the  function  signal).
   abort  does  not  flush  the  buffers nor  does  it  call  C++  static
   destructors.  It is preferable to use exit rather than abort  for  C++
   programs.

   Example
   #include <stdlib.h>
   #include <stdio.h>
   main()
   {
   FILE *fp;
        fp = fopen("file.dat","r");
        if(fp == NULL)
        {
             fprintf(stderr,"Could not open file.dat\n");
             abort();
        }
        printf("File opened\n");
   }

See Also: exit _exit raise

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson