int * myVar = new int [5]; for (int i = 0; i < 5; i++) myVar[i] = i // 0 1 2 3 4 myVar in the array // delete stuff *optional* delete [] myVar; myVar = NULL; // free up memory declared on the stack