Export (0) Print
Expand All

CHeapPtr::operator =

Assignment operator.

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

p

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
myHP.Allocate(10);
// Create a second heap pointer 
// and assign it to the first pointer.
CHeapPtr <int> myHP2;
myHP2 = myHP;   

Header: atlalloc.h

Show:
© 2014 Microsoft