(*i have to use my array struct, and it has to be dynamical)
I want the Array
struct to be filled with Expe
class objects. I`m using Templates but somehow my struct header doesn't recognize the template I have created.
Struct header:
template <class T>;
struct Arr{
int days;
T * M;
};
typedef Arr* Array;
Struct cpp:
void constr(Array &o){
//Construct of 31*1 Matrix
o=new Arr;
o->days = 31;
o->M = new T[o->days];
It should be fine I think, but I get error:
..\ListStruc.cpp:26:13: error: expected type-specifier before 'T'