Dynamic allocation by eltony

Jun 2, 2014 at 10:08pm
what it is dynamic allocation elton ?

Last edited on Jun 2, 2014 at 10:09pm
Jun 2, 2014 at 10:18pm
closed account (2UD8vCM9)
I don't know who elton is.
Dynamic allocation is allocating memory (usually used when an array size is nonconstant)

1
2
3
4
5
6
 int size;
cout << "enter size of our array:";
cin >> size;
int * dynamicarray = new int [size]; //allocation

delete dynamicarray[]; //deallocation  

Last edited on Jun 2, 2014 at 10:18pm
Topic archived. No new replies allowed.