Creating an array with templates
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:
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?
T *a = new T [size];
error: expected initializer before ‘*’ token