jeudi 20 avril 2017

Catching the writing access exception doesn't work

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.

int main(){ int *pint = new int();

    delete pint;


    try
    {

        *pint = 100;


    }
    catch (...)
    {
        cout << "this is the one " << endl;
    }


}

Aucun commentaire:

Enregistrer un commentaire