C++: call original definition of operator equals
- by Luis Daniel
I am overloading the operator equals (==) as show bellow:
#include <string>
#include <algorithm>
bool operator == (std::string str1, std::string str2) {
std::transform(str1.begin(), str1.end(), str1.begin(), ::tolower);
std::transform(str2.begin(), str2.end(), str2.begin(), ::tolower);
return (str1 == str2);
}
but, the…