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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice