S
Stub
When I try to overload the == operator, it gives me an "error C2804: binary
'operator ==' has too many parameters."
bool operator==(const Store& Store1, const Store& Store2);
After Adding keyword, friend, to the above declaration, the error disappear.
Of course there're 3 parameters involved in this newly defined == operator.
I am trying to understand why the compiler complains about too many
parameters for the declaration. Is this due to that the original ==operator
takes only 2 parameters? What is this declaration conflicting with
actually?
Could someone help me to understand this? Thanks!
'operator ==' has too many parameters."
bool operator==(const Store& Store1, const Store& Store2);
After Adding keyword, friend, to the above declaration, the error disappear.
Of course there're 3 parameters involved in this newly defined == operator.
I am trying to understand why the compiler complains about too many
parameters for the declaration. Is this due to that the original ==operator
takes only 2 parameters? What is this declaration conflicting with
actually?
Could someone help me to understand this? Thanks!