Accessing function from a derived class

So, I’m creating a rough outline of an AI. What I’m currently trying to accomplish is trying to access a function in a script “Movement” from a script “AI_Controller”. The problem is AI_Controller is derived from Movement( which will handle movments like avoiding collisions, moving around friendlies, etc). I tried making a forward declaration of the class AI_Controller and casting using that, but I got obscure errors which I can make no sense of. I understand I can’t just include AI_Controller.h as that would create a circular dependency.
Without going into to much detail, I want to access a return function that gives me an type specified in an enum, which I will use to compare overlapping actors and the actor calling the movement function.

If anything I’ll just use tags, but I’d prefer not to.

Here is the function in Movement where I want to cast to the derived class in order to access it’s function.

You only need to use a forward declaration within your header file, if you are storing a pointer to the cast object as that derived class.

Within your source (.cpp) file, you can include the AI_Controller.h file without issue.

If you then get errors from compile, you need to address those errors or you won’t be able to use the derived class within your source.

However, if the method(s) you are trying to access in the derived class are overriding methods existent within your parent, you don’t need to cast the object at all to use them.
As a cludgy workaround, you can create stub functions in the parent classes to given them access to the children’s desired behavior.