No buddy, I did understand your question. If you see example in the last slide, you will see that you can improvise from it, by changing the use of literal (20) by the use of a variable for defining number of array's element.
int elements = 20;
int *p = new int[ elements ]; // allocate memory
// Do whatever you want here
delete  p; // free alocated memory