Can the ==
operator be overloaded so as to compare two char[]
using a string comparison?
No; at least one parameter of an operator overload must be of class or enumeration type.
char[]
and char*
are array and pointer types, which are not class or enumeration types.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With