In the code below I would like array to be defined as an array of size x when the Class constructor is called. How can I do that?
class Class { public: int
Use the new operator:
class Class { int* array; Class(int x) : array(new int[x]) {}; };