What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-10-01 00:47:02
compare string c++
// comparing apples with apples #include <iostream> #include <string> int main () { std::string str1 ("green apple"); std::string str2 ("red apple"); if (str1.compare(str2) != 0) std::cout << str1 <<... Add solution