std: bitsets of variable size

  • Thread starter Christian Christmann
  • Start date
C

Christian Christmann

Hi,

I need the STL class "bitset" with all its
algorithms and a variable size which can
be increased dynamically.

The ordinary stl bitset have to be fixed in
size at compile time.

Any ideas to solve that problem?

Thanks
Chris
 
K

Kristo

Kristo said:
That'll work fine, provided the OP can use Boost. A standards
compliant (and therefore not OT) solution would be to use a
deque<bool>.

On second thought, that's not entirely correct, because a bitset has a
bunch of functions not found in other STL containers. The only
standards complaint solution, therefore, is to roll your own. Using a
deque<bool> as an underlying container will probably help with that.

Kristo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,291
Messages
2,571,453
Members
48,138
Latest member
DongGell95

Latest Threads

Top