fork(1) download
  1. #include <iostream>
  2. #include <sstream>
  3. #include <string>
  4. #include <stdint.h>
  5. using namespace std;
  6.  
  7.  
  8.  
  9.  
  10.  
  11. int main() {
  12.  
  13. uint64_t x;
  14. string in = "fffefffe";
  15.  
  16. std::stringstream ss;
  17. ss << std::hex << in;
  18. cout << ss.str() << endl;
  19. ss >> x;
  20. cout << x << endl;
  21.  
  22. x = x << 2;
  23. cout << x << endl;
  24.  
  25. std::ostringstream ss2;
  26.  
  27. ss2 << std::hex << x;
  28.  
  29.  
  30. cout << ss2.str() << endl;
  31.  
  32.  
  33. // your code goes here
  34. return 0;
  35. }
Success #stdin #stdout 0s 3464KB
stdin
Standard input is empty
stdout
fffefffe
4294901758
17179607032
3fffbfff8