[Solved] ==operator overload only on certain occasions
You can’t overload operator== for C strings, because they are pointers and operators can be overloaded if at least one operand is a class or enum. What you can do is create your own comparator function and use it in your code instead of ==: template<typename T> bool my_equal(const T& a, const T& b) { … Read more