Write the necessary preprocessor directive to enable the use of the exit function. Write the definition of a function named panic. The function prints the message “unrecoverable error” and then terminates execution of the program, indicating failure..

LANGUAGE: C++

CHALLENGE:

Write the necessary preprocessor directive to enable the use of the exit function. Write the definition of a function named panic. The function prints the message “unrecoverable error” and then terminates execution of the program, indicating failure.

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,

1 Comment

  1. Josh on April 24, 2015 at 1:33 pm

    Fixed for those leaving thumbs down without looking at the code at all

    void panic()
    {
    cout << "unrecoverable error" << endl;
    exit (EXIT_FAILURE);
    }

Leave a Comment

You must be logged in to post a comment.