1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Using variable length variable (bitset)

Discussion in 'C++' started by myk45, Sep 2, 2010.

  1. myk45

    myk45 New Member

    Joined:
    Sep 2, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello.

    i needed a variable size bit string. And since bitset provides several operations, i wanted to use it. But is it possible to make it a variable size one?

    class TryBits {
    private:
    string s;
    bitset b; //now i need n = s.size().
    };
    How can i achieve this?
    Thanks
     

Share This Page