Original Post
Hello!
in my app, I''ve the following classes and files:
main.cpp and main.h
vmObject.cpp and vmObject.h defining the class vmObject
mScript.cpp and mScript.h defining the class mScript
vmObject has an instance of mScript, so it''s possible to do sometuing like this: vmObject::runScript();
But since I want the methods of mScript to alter the attributes of its appropriate vmObject, mScripts needs to have a pointer of vmObject as attribure as well. like this:
class vmObject
{
private:
mScript *script;
}
class mScript
{
private:
vmObject *vmobject;
}
Since both classes are in different files, it would be neede to include them mututal, wich isn''t possible (in mscript.h you would #include "vmobject.h" and in vmobject.h you would #include "mscript.h")
So, how to solve this?
Thanks you