:I have the following scenario:
// NOTE: pseudo example only, sorry for the early typos
class Foo
{
public:
virtual bool IsItSo();
virtual bool IsItSo(string x);
};
bool Foo::IsItSo()
{
return true;
}
class Bar : Foo
{
public:
// not here
virtual bool IsItSo(string x);
};
bool Bar::IsItSo(string x)
{
return (x == "")
}
class Helper
{
public:
void HelperMethod();
};
void Helper::HelperMethod()
{
Bar *p = new Bar
// ... hack hack hack
bool b = p->IsItSo(); //<-- compilation error
}
The specific error I get is:
file.cpp(1124) : error C2660: 'Bar::IsItSo' : function does not take 0 arguments
Could someone explain this magical-madness to me?