Hello,
I'm trying to create a temporary array inside a member function. It used to be restricted to an int type, but now I want to add templates to the class so what used to be:
Is changed to:Code:int *a = new int[size];
Is it possible to use this method for T? Or do I need to call the constructor here? I get this error message, which I think might be related to this, what do you think?Code:T *a = new T [size];
Code:error: expected initializer before ‘*’ token