如题

解决方案 »

  1.   

    MSDN的例子:// crt_abort.c
    // compile with: /c
    // This program demonstrates the use of
    // the abort function by attempting to open a file
    // and aborts if the attempt fails.#include  <stdio.h>
    #include  <stdlib.h>int main( void )
    {
        FILE    *stream = NULL;
        errno_t err = 0;    err = fopen_s(&stream, "NOSUCHF.ILE", "r" );
        if ((err != 0) || (stream == NULL))
        {
            perror( "File could not be opened" );
            abort();
        }
        else
        {
            fclose( stream );
        }
    }
      

  2.   

    怎么会
    Required header:<process.h> or <stdlib.h>