fork download
  1. #include <cstdio>
  2. #include <sstream>
  3.  
  4. int main() {
  5. std::istringstream s{"1F 00 00 00"};
  6. int number = 0;
  7. s >> std::hex >> number;
  8. std::printf("%d\n", number);
  9. return 0;
  10. }
Success #stdin #stdout 0s 4392KB
stdin
Standard input is empty
stdout
31