Where does abort() and terminate() "live"?

Posted by user325016 on Stack Overflow See other posts from Stack Overflow or by user325016
Published on 2010-04-24T17:26:58Z Indexed on 2010/04/24 17:33 UTC
Read the original article Hit count: 220

Filed under:

Regarding the terminate handler,

As i understand it, when something bad happens in code, for example when we dont catch an exception,

terminate() is called, which in turn calls abort()

set_terminate(my_function) allows us to get terminate() to call a user specified function my_terminate.

my question is: where do these functions "live" they don't seem to be a part of the language, but work as if they are present in every single cpp file, without having to include any header file.

© Stack Overflow or respective owner

Related posts about c++