Simple error I need help with

I'm pretty new to this so please bear with me.

I'm getting an error over the '.' in the code.

What I'm trying to do is tell my Object manager class to run its updateAll and RenderAll functions in the update function of my main game engine cpp file.

When I hover over it I get the error " Expected Identifier " and when I compile is I get a bunch of errors saying "Syntax error missing ';' before '.' "

I'm completely confused and I'm unsure how to fix this.

1
2
3
ObjectManager.updateAll();

	ObjectManager.RenderAll();
Is ObjectManager a class or an object?
If it is a class you can call its functions with ObjectManager::updateAll(); (given that the functions are static)

If it is an object then perhaps you created a pointer and meant to use -> instead of .
Last edited on
Hello Mrsoap,

It would be better if you post the whole code as the error may start somewhere other than where the compiler is saying.

This way people do not have to guess at what your small bit of code is because of what they can not see.

Andy

Edit: Also a good idea to post the whole error message and not your interpretation of it.
Last edited on
Topic archived. No new replies allowed.