Edit: Ok I wrote a little test program to show here. Here is the Source Code.
main.cpp:
#include \"core.h\"
Core core;
int main()
{
core.coreFunc
Either you forgot to define core's default constructor, or core cannot be trivially default constructed (due to having a base or member that does not have a default constructor.
To core, add:
class Core {
Window window;
Core() {} //add this line
void someFunction()
{
window.doSomething();
}
}
To window, add:
class Window
{
Window() {} //add this line
void someFunction()
{
core.doSomething();
}
}
If either fails to compile, you'll have pinned down the problem a little more
Well now that the error message was clarified, I see the error right off. Window.h requires Core core to be defined, and Core.h requires Window to be defined. The solution is to do as vz0 suggested from the get go. Move the definition of Window::someFunction to window.cpp (and I feel the need to go apologize to vz0)