Hi,
I have defined a virtual operator== in a class, and redefined it in its heirs.
In the heirs i want to call operator== of the super class.
But i don't know the syntax, how do we write it?
class A
{
public:
virtual bool operator== (const A& other) const
{
//do stuff
}
};
class B : public A
{
public:
bool operator== (const A& other) const
{
const B* b = dynamic_cast<const B*> (&other);
//do stuff
//How to call A:
perator== ?
}
};
--
Globos
I have defined a virtual operator== in a class, and redefined it in its heirs.
In the heirs i want to call operator== of the super class.
But i don't know the syntax, how do we write it?
class A
{
public:
virtual bool operator== (const A& other) const
{
//do stuff
}
};
class B : public A
{
public:
bool operator== (const A& other) const
{
const B* b = dynamic_cast<const B*> (&other);
//do stuff
//How to call A:
}
};
--
Globos