c++ - Template class without a name -



c++ - Template class without a name -

i have class uses template, can't rid of error:

8:1: error: template class without name

my code follows:

#ifndef bst #define bst #include <utility> template <typename datatype> class bst { ... };

the error occurs @ class bst i'm pretty sure datatype name. missing how templates work?

the preprocessor line

#define bst

is messing up.

change like:

#ifndef bst_h #define bst_h #include <utility> template <typename datatype> class bst { ... };

c++ class templates

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -