C++ Programming
04-01-2009, 04:40 PM
Hi everybody
I am having a small querry
int * p = new int(10);
int a = 10;
int * q = &a;
then to delete pointer p
delete * p;
Whether pointer q is also created on the heap.
If so how to delete it?
Is q = NULL is correct?
I am having a small querry
int * p = new int(10);
int a = 10;
int * q = &a;
then to delete pointer p
delete * p;
Whether pointer q is also created on the heap.
If so how to delete it?
Is q = NULL is correct?