class Base
{
public:
virtualbool foo(){ returnfalse; }
void something
{
bool retVal = foo();
}
};
class A : public A_interface
{
public:
virtualbool foo(){ returntrue; }
};
class A_interface : public Base
{
public:
virtualbool foo() = 0;
};
A a; a.something should have a retVal == true.
Of course B b; b.something will have a retVal == false.
But if you would be more specific it'll help us in being more specific, too ;-).
Write down your code and your expected and actual results.
Then we'll be able to help you make the last two match or at least explain why they never can match and maybe provide another solution that'll emulate the effect.