fork(56) download
  1. #include <iostream>
  2. #include <sstream>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.  
  8. int x;
  9. istringstream iss("a1a56");
  10. iss >> hex >> x;
  11. ostringstream oss;
  12. oss << x;
  13. string s(oss.str());
  14.  
  15. cout << s << endl;
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0.02s 2816KB
stdin
Standard input is empty
stdout
662102