typedef void (*terminate_handler)();
#include <exception>
#include <iostream> #include <exception> void NewTerminate() { std::cout << "The end." << std::endl; abort(); } int main() { // Set a new terminate handler and get the old one back terminate_handler qOldTerminate = set_terminate(NewTerminate); // Call terminate directly terminate(); return 0; }
© 20072024 XoaX.net LLC. All rights reserved.