Open main menu

CDOT Wiki β

Changes

OOP344 ljubomir notes

130 bytes added, 18:23, 31 October 2009
Week 6 - Oct 11
==Week 6 - Oct 11==
'''Dynamic Memory Allocation'''
You need:
#a pointer for the data type that will occupy the memory whose address you will point to
*int* p;
#if the pointer is already pointing at another already allocated memory, deallocate it
#allocate memory and set the pointer to its address
#use the memory
#when you are done, deallocate it
*delete[] p;
=Discussion=
1
edit