可以使用按位AND运算符(&)清除一位。
// x位将被清除 number &= ~(1LL << x);
reset(x)或set(x,false)-清除位置上的位x。
std::bitset<5> num(std::string("01100")); num.reset(2); // num现在是01000 num.reset(0); // num仍然是01000 num.set(3,false); // num现在是00000
友情链接: json在线解析 通晓查询 糯晒黄历 姓名打分