0

I have this inside my private class declarations

#include "stdafx.h"
using namespace std;
    template <typename Key, typename T>
    class A{
    //....
    private:
        static const unsigned int HSIZE = 32;
        struct Bucket {
            Key key;
            T value;
            bitset<HSIZE> jumpMap;
        };
    //....
    };

Gives the following errors:

Error   1   error C4430: missing type specifier - int assumed
Error   2   error C2059: syntax error : '<'
Error   3   error C2238: unexpected token(s) preceding ';'

And when i remove the bitset line, it gives me no errors. What am i doing wrong?

EDIT: Added more relevant lines

JavierIEH
  • 743
  • 8
  • 19

2 Answers2

3

Have you included the bitset header? I think you have missed it?

Kiril Kirov
  • 37,467
  • 22
  • 115
  • 187
2

Should HMAX be HSIZE instead? Otherwise make sure you include < bitset >, and that the name is in scope. You probably have a using namespace std in your code, since you don't qualify it with std::. But my bet goes to HMAX <-> HSIZE.

K-ballo
  • 80,396
  • 20
  • 159
  • 169