Here I have tried to catch the write access violation, but it doesn't work. I have tried some other ways but none worked for me. Can you please explain how it should work?
int main(){
int *pint = new int();
delete pint;
try
{
*pint = 100;
}
catch (...)
{
cout << "this is the one " << endl;
}
}