class Base
{
public:
virtual bool Load()=0;
bool Load(const char* filename);
};
bool Base::Load(const char* filename)
{
/* read file to some memory buffer member */
bool success = Load();
/* close file */
return success;
}
class Derived : public Base
{
public:
bool Load();
}
bool Derived::Load()
{
/* do whatever needs to be done */
return true;
}
SomeOtherClass::Load()
{
Derived* derived = new Derived;
derived->Load("somefile");
}
I am getting a "function does not take 1 arguments" on the call to Load in SomeOtherClass::Load(), if I change the name of the Load(const char*) function to something else or I downcast the derived pointer to the base class, it does compile and links fine.
Same error on Visual Studio 2010 and 2012
Any ideas?
Thanks!