unsigned long long bitset<N>::to_ullong() const;
#include <bitset>
#include <bitset>
#include <iostream>
int main()
{
using namespace std;
// Create a bitset
bitset<4> qBits(5);
cout << "bitset<4> : "<< qBits << endl;
// Output the unsigned long long value
unsigned long long ullValue = qBits.to_ullong();
cout << "The bitset value is " << ullValue << endl;
// Keep the window open
cin.get();
return 0;
}
© 20072025 XoaX.net LLC. All rights reserved.