Hello, i want to be able to dynamically create a number of objects based upon user input. I want this array to be accessible by the whole class however i do not understand the notation to do this.

Currently, in the private attributes section of my class i have:

object* objectTest

Then in my constructor i try and create the array using this line, based on how many objects the user enters:

object* objectTest = new object[numOfObjects];

This however does not work, i think i just have the wrong notation in the private attributes section.

i have looked at tutorials however i cannot find the answer

thanks in advance