fork(2) download
  1. #include <algorithm>
  2. #include <iostream>
  3.  
  4. void output_hex(char ch)
  5. {
  6. std::cout << std::hex << int(ch);
  7. }
  8.  
  9. int main(int argc, char **argv)
  10. {
  11. std::string str("hello");
  12. std::for_each(str.begin(), str.end(), output_hex);
  13. return 0;
  14. }
Success #stdin #stdout 0s 3428KB
stdin
Standard input is empty
stdout
68656c6c6f