XOR Strings 3

  • + 0 comments

    I struggled in C++ I tried on C++14 over 20 times but it didn't work. Then I changed to C++11 finally it worked. I cannot understand why this happened. Who please explain this to me.

    [string strings_xor(string s, string t) { string res = ""; for(int i=0; i < s.size(); i++) { if(s[i] == t[i]) res += '0'; else res += '1'; } return res; }

    ](https://)