unsigned long bitset<N>::to_ulong() 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 value unsigned long ulValue = qBits.to_ulong(); cout << "The bitset value is " << ulValue << endl; // Keep the window open cin.get(); return 0; }
© 20072024 XoaX.net LLC. All rights reserved.