Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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.

Example

// 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;   

Requirements

Header: atlalloc.h

Show: