Ignore my previous reply. I downloaded the code and it is not a namespace issue. The problem is that Core.h includes ControlPanel.h. I don't see a reason why it is included, you can try to remove it from "Core.h" and see if that fixes it. If not, remove the #include "Core.h" from ControlPanel.h and instead just add the following line:
class Core;
You have to include "Core.h" in ControlPanel.cpp where you implement ControlPanel::newFunction();
hubi,
THANK YOU..... adding class Core to ControlPanel.h did the trick
I would like to understand why.
1) I guess without
class Core
the ControlPanel class and hence its member functions don't know anything about the Core class, and adding
class Core
then provides that definition to ControlPanel?
2) Then when I call controlPanel.newFunction(core); in main it uses the actual instance "core" represented by the Core class, is that correct?