bitset<N>& bitset<N>::set();
#include <bitset>
bitset<N>& bitset<N>::set(size_t qIndex, bool bValue = true);
#include <bitset>
#include <iostream>
int main()
{
using namespace std;
// Create a bitset
bitset<4> qBits(5);
cout << "bitset<4> : " << qBits << endl;
// Set all fo the bits to one
qBits.set();
cout << "bitset<4> : " << qBits << endl;
// Keep the window open
cin.get();
return 0;
}
© 20072025 XoaX.net LLC. All rights reserved.