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

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -