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

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

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