重写bitset表达式,使用下标操作符对测验结果进行置位(置1)和复位(置0)
bitset<30> bs;for (int i = 0; i != bs.size(); i++){bs.set(i); //置位为1bs.reset(i); //复位为0cout << bs[i] << endl;}
补充:软件开发 , C++ ,
bitset<30> bs;for (int i = 0; i != bs.size(); i++){bs.set(i); //置位为1bs.reset(i); //复位为0cout << bs[i] << endl;}
补充:软件开发 , C++ ,