-
Bitset help
Code:
#include <iostream> #include <bitset> using namespace std; int main() { bitset<8> bits = 83; cout << bits << " "; cout << bits.to_ulong() << endl << endl; bits[0] = 0; cout << bits << " "; cout << bits.to_ulong() << endl << endl; bits[1] = 0; cout << bits << " "; cout << bits.to_ulong() << endl << endl; return 0; }
id like if bitset could be explained to me so I could determine the output of this program.
I understand that it converts the number into an integer?
an example using the format about would be great.
-
Dunno if this is the same as your other bitset question, but until you reformat your post so you don't have code on one line, nobody will care.