CHeapPtr::Reallocate
힙에 메모리를 할당 하려면이 메서드를 호출 합니다.
bool Reallocate(
size_t nElements
) throw( );
매개 변수
- nElements
새 수 할당할 메모리의 양을 계산 하는 데 사용 되는 요소입니다.
반환 값
메모리 성공적 이면 true를 반환 할당 실패 시 false입니다.
예제
// Create a new CHeapPtr object
CHeapPtr <int> myHP;
// Allocate space for 10 integers on the heap
myHP.Allocate(10);
// Resize the allocated memory for 20 integers
myHP.Reallocate(20);
요구 사항
헤더: atlalloc.h