A
aegis
If I have a reference type such as:
T& obj;
and assuming it is initialized to an object
of type T, then the object type of the following
expression:
&obj;
would be "Pointer to T" or "Pointer to T&"?
Also, if I dynamically allocate an array of
pointers to T, as follows:
T **p = new T*[n] for some integer n
and further populate it with pointer
values to T objects, then does:
delete [] p
handle the freeing of memory for all T objects
and then the space for the array of T* objects?
T& obj;
and assuming it is initialized to an object
of type T, then the object type of the following
expression:
&obj;
would be "Pointer to T" or "Pointer to T&"?
Also, if I dynamically allocate an array of
pointers to T, as follows:
T **p = new T*[n] for some integer n
and further populate it with pointer
values to T objects, then does:
delete [] p
handle the freeing of memory for all T objects
and then the space for the array of T* objects?