fork download
  1. void printString(string source)
  2. {
  3. for (int i = 0; i < source.length(); i++)
  4. cout << source[i];
  5. cout << endl;
  6. }
  7.  
  8. void printHex(string source)
  9. {
  10. for (int i = 0; i < source.length(); i++)
  11. cout << hex << uppercase << (int)(unsigned char) (source.c_str()[i]) << ' ';
  12. cout << endl;
  13. }
  14.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:18: error: variable or field 'printString' declared void
 void printString(string source)
                  ^
prog.cpp:1:18: error: 'string' was not declared in this scope
prog.cpp:8:15: error: variable or field 'printHex' declared void
 void printHex(string source)
               ^
prog.cpp:8:15: error: 'string' was not declared in this scope
stdout
Standard output is empty