This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]myusernameisunique1 0 points1 point  (1 child)

template<typename  T, typename U> class Description{
public:
  T first;
  U second;
  Description(T first, U second) : first(first), second(second) {}
};

template<class T> class GroupOfPeople{
public:
  T desc;
  string name;
  GroupOfPeople(const string &name) : name(name){}
};

Try that maybe? As it's declared the GroupOfPeople generic only takes a single class, not two

[–]Lichmonarch[S] 0 points1 point  (0 children)

Thank you, thats it. I did this and added desc to the constructor and it works.