If I wanted to access a function that is in a derived class from it's base class, what would be the best way of doing so? I have experimented with functions like Interact( char *pCommand, char **pArgs ) which is inside the base class, and can be overidden by the derived class to access it's functions. But that doesn't really seem like the best way to do so. Can someone give me a suggestion or two as to what the best way to do this is. If you need a better explanation of what I'm trying to do, just ask.

The base class knows nothing about the existence of child classes, and should never even want to know.
If you think you have such a requirement, you have a fundamentally flawed design.

But most likely all you need are some virtual functions, which would make the whole thing happen implicitly, so the correct overridden function from a child class gets called from a non-overridden method in the base class when that method is used from an instance of that child class.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.