標準ライブラリbitsetタイプ
1174 ワード
, 0 1. bitset 。 bitset
bitsetオブジェクトの定義と初期化
vector,bitset , bitset , bitset , 。
bitset b; //b n , 0
bitset b(u); //b unsigned long u ,
bitset b; //b string s "1101"
bitset b //b s pos n
bitsetオブジェクト上の操作
b.any() // 1
b.none() // 1
b.count() //1 size_t
b.size()
b[pos]
b.test(pos) // 1
b.set() // 1
b.set(pos)
b.reset() // 0
b.reset(pos)
b.flip() //
b.flip(pos)
b.to_ulong() // unsigned long
os<