--
Last edited on
bool operator == (const char rightside)
You wrote an operator here that accepts a single const char.
w1 == "Apple"
"Apple"
is not a single const char. For the purposes of this code, it's effectively a const char*
A const char
is not the same as a const char*
Last edited on
--
Last edited on
--
Last edited on
Why did you comment out line 13?
--
Last edited on
Well, line 13 would enable to compare the class with a string so that
if (w1 == "Apple")
works.