Export (0) Print
Expand All

CHeapPtr::operator =

Assignment operator.

CHeapPtr< T, Allocator >& operator =( 
   CHeapPtr< T, Allocator >& p  
) throw( );


An existing CHeapPtr object.

Returns a reference to the updated CHeapPtr.

// Create a new CHeapPtr object
CHeapPtr <int> myHP;
// Allocate space for 10 integers on the heap
// Create a second heap pointer 
// and assign it to the first pointer.
CHeapPtr <int> myHP2;
myHP2 = myHP;   

Header: atlalloc.h

© 2014 Microsoft