fork(1) download
  1. void gamma(string s1, string s2, string &res)
  2. {
  3. for (int i = 0; i < s1.length(); i++) {
  4. res[i] = (s1.c_str()[i]) ^ (s2.c_str()[i]);
  5. }
  6. }
  7.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:12: error: variable or field 'gamma' declared void
 void gamma(string s1, string s2, string &res)
            ^
prog.cpp:1:12: error: 'string' was not declared in this scope
prog.cpp:1:23: error: 'string' was not declared in this scope
 void gamma(string s1, string s2, string &res)
                       ^
prog.cpp:1:34: error: 'string' was not declared in this scope
 void gamma(string s1, string s2, string &res)
                                  ^
prog.cpp:1:42: error: 'res' was not declared in this scope
 void gamma(string s1, string s2, string &res)
                                          ^
stdout
Standard output is empty