fork download
  1. #include <iostream>
  2. #include <sstream>
  3.  
  4. int main()
  5. {
  6. std::istringstream in("Humpty Dumpty");
  7.  
  8. char ch;
  9. while (in.get(ch))
  10. std::cout << std::hex << static_cast<unsigned>(ch) << ' ';
  11. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
48 75 6d 70 74 79 20 44 75 6d 70 74 79