c++ - Can't use a struct(with template) inside a class -
c++ - Can't use a struct(with template) inside a class -
i made node struct template:
template <typename t> struct node{ t data; node* next; node* prev; };
it compiles fine when seek utilize within class gives me error: invalid utilize of template-name ‘node’ without argument list
in class' context, need add together template parameter instead of using plain node*
:
struct b { node<int>* next; };
c++ templates struct
Comments
Post a Comment