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
Two options:
Use std::vector. This allows easy re-sizing of the array. Use std::tr1::array. This has a static size.
Both can be correctly initialized in the constructors initializer list.