KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to make a bitset in C++. I did a bit of research. All examples I found where like this: bitset<6> myBitset; // do something with it But I don't know the size of the bitset when I define the variable in my class: #include <bitset> class Test { public: std::bitset *myBitset; } This won't compile... And initializing like this also doesn't work: int size = getDependentSizeForBitset(); myBitset = new bitset<size>();
Tags (comma-separated)
Save Edits
Cancel