I am looking to have a member of type bitset in a C++ class. Is it possible ?
Something like below:
You can do it exactly like you'd expect.
But I see compilation error :
error C2143: syntax error : missing ';' before '<'
I am compiling using "std" namespace and included bitset headerfile. I am compiling in Visual Studio 2010.
using namespace std;
Compiles just fine for me.
You probably have syntax errors somewhere, which is why you're getting a syntax error ( =P ). I won't be able to tell you what you're doing wrong without seeing code.
Last edited on
It looks good now in my project.
Had not included namespace in my header file.
Have a good day.