Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ビットセットを文字列で再初期化することは可能ですか? 次のような単純なクラスがあります。
class Bits{ public: bitset<1024>b; };
後で文字列を取得し、コードで文字列を使用してビットを設定することは可能ですか (文字列の長さは 1024 で、1 と 0 のみです)。
Bits c; c.b.something(string);
はい、最も簡単なのは次のとおりです。
b = bitset<1024>(some_string_form);