fork(34) download
  1. #include <iostream>
  2. #include <bitset>
  3. using namespace std;
  4.  
  5. int main() {
  6. std::bitset<8> bits("1111");
  7. std::cout << bits.to_ulong() << std::endl;
  8. return 0;
  9. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
15