bitset<N> bitset<N>::operator>>(size_t qPos) const;
#include <bitset>
#include <bitset>
#include <iostream>
int main()
{
using namespace std;
// Create a bitset
bitset<8> qBits(75);
cout << "bitset<8> : "<< qBits << endl;
// Shift the bits in the bitset
bitset<8> qShiftedBits = (qBits >> 2);
cout << "Shifted : "<< qShiftedBits << endl;
// Keep the window open
cin.get();
return 0;
}
© 20072025 XoaX.net LLC. All rights reserved.