reference& bitset<N>::reference::operator=(const reference& kqrRef);
#include <bitset>
reference& bitset<N>::reference::operator=(bool bBool);
#include <bitset> #include <iostream> int main() { using namespace std; // Create a bitset of four bits with the 2nd one "on" bitset<4> qBits(2); cout << "bitset<4> : "<< qBits << endl; // Set the fourth bit equal to the second qBits[3] = qBits[1]; cout << "bitset<4> : "<< qBits << endl; // Set the third bit equal to true qBits[2] = true; cout << "bitset<4> : "<< qBits << endl; // Keep the window open cin.get(); return 0; }
© 20072024 XoaX.net LLC. All rights reserved.