Introduction
C ++ is unmanaged language, because the programs can escape without saving the user’s data and give the error messages, etc. For example, it takes only to get into an uninitialized memory. For example:
void fall()
{
char * s = "short_text";
sprintf(s,"This is very long text");
}
or
void fall()
{
int * pointer = NULL;
*pointer = 13;
}
It would be better if we could "catch" a program crash just like in java we are catching exceptions, as well we could do anything before the program will crash (save the user’s document, display a dialog with the error message, etc.)A task does not have a general solution, as C ++ does not have its own model of exception handling that is work-related with the memory. Nevertheless, we will consider two methods that are using the features of the operating system that caused an exception.