In standard C++, to make a function overridable, you'd make it virtual in your base class.
So perhaps you need to change the signature of your isKnownWord function to:
public:
virtual bool isKnownWord(){};
Then in any derived classes you can override the function, all you'd do is declare it as a virtual function in the header for your derived class and then define the overridden function in the .cpp implementation.
e.g.
header for base class
class Base
{
public:
virtual bool isKnownWord(){};
};
header for derived class:
#include "Base.h"
class Derived:public Base
{
public:
virtual bool isKnownWord();
};
Derived.cpp:
#include "Derived.h"
bool Derived::isKnownWord()
{
// your overridden code here
}
If you're targeting the CLR then I think you should use the override keyword in the header file for your derived class.
i.e.
virtual bool isKnownWord() override;
I don't think that the override keyword is a part of standard C++....But I could be wrong, I'm still using VS2003!
Cheers for now,
Jas.