#include<bitset>
#include<iostream>
using namespace std;
int main()
{
bitset<8> a=29;
cout<<a<<endl;
a[0]=1;
a[6]=1;
cout<<a<<endl;
bitset<8> b[3]={-3,-1,12};
int ib[3]={-3,-1,12};
cout<<ib[0]<<" \t\t"<<ib[1]<<" \t\t"<<ib[2]<<endl;
cout<<b[0]<<" \t"<<b[1]<<" \t"<<b[2]<<endl;
return 0;
}
bitset cpp
最新推荐文章于 2024-08-24 14:01:36 发布