http://www.cppblog.com/mydriverc/articles/33991.html
1 2 3 4 5 6 7 8 9 10 11 12 13
|
| int main() { string str = "0101"; bitset<32> b1(str); bitset<32> b2(5); cout << b2[3] << endl; cout << b2[2] << endl; cout << b2[1] << endl; cout << b2[0] << endl; return 0; }
|