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

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -