mercredi 1 novembre 2017

What does a deleted pointer point to?

int*a=nullptr; //NULL before C++11
a=new int(1);
delete a;

What does a point to now? Does it point to nullptr or does it point to the address it was pointing to before it was deleted?

Aucun commentaire:

Enregistrer un commentaire