We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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://)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
XOR Strings 3
You are viewing a single comment's thread. Return to all 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://)