how to create interface "operator=="# Programming - 葵花宝典
d*e
1 楼
how to force a bunch of classes in same hiarachy all have "operator=="? (or
something like equal())
This wont work:
class Base
{
public:
virtual bool operator==(const Base& a) = 0;
};
because follwoing won;t work:
class Derived
{
public:
bool operator==(const Derived& a);
};
then how to do it?
something like equal())
This wont work:
class Base
{
public:
virtual bool operator==(const Base& a) = 0;
};
because follwoing won;t work:
class Derived
{
public:
bool operator==(const Derived& a);
};
then how to do it?