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
Declare your array as a pointer. You can initialize it in the initializer list later through through new.
Better to use vector for unknown size.
You might want to look at this question as well on variable length arrays.