fork(1) download
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <bitset>
  4.  
  5. int main()
  6. {
  7. const unsigned long value1 = std::bitset<8>(std::string("10100101")).to_ulong();
  8. const unsigned long value2 = std::bitset<8>(std::string("00110000")).to_ulong();
  9.  
  10. std::cout << std::hex << value1 << " " << std::hex << value2 << '\n';
  11. }
Success #stdin #stdout 0.01s 2812KB
stdin
Standard input is empty
stdout
a5 30