I have two classes, class1 and class2. Both need to reference an object of the other class and it won't compile, i.e.
I'm guessing the reason it doesn't compile is Class2 will not have been declared when the compiler reaches the "MyFunction(Class2 Obj)" line but I really need it to work!!Code:class Class1 { public: void MyFunction(Class2 obj); }; class Class2 { Class1 obj; };
Any help would be hugely appreciated.
dt