lets say I have a base class B and 2 classes that derived from it:
class B
{
public:
A_type* Check_Memory(const LeafInterface* leaf = 0);
}
class D1 : public B {}
class D2 : public B
{
A_type* Check_Memory(const LeafInterface* leaf, U32* faults);
}
now, when I call:
D1 d1;
d1.Check_Memory(leaf);
it call the function from the base class as expected,
but when I do the same with:
D2 d2;
d2.Check_Memory(leaf);
instead of calling the function from the base class, I get the following error: function does not take 1 arguments.
does my only solution is declaring another function in D2 that call the base function? is there more elegant way in C++ for doing it?