Quote:Original post by Alan Kemp
You can't solve this with references, you will have to use pointers.
*** Source Snippet Removed ***
Alan
I somewhat agree... Why not, though?
If you pass a reference of the value of this, it should work (like in this example of an overloaded operator):
Log &Log::operator <<(const string &Message) { m_LogFile << Message; return (*this);}
So, in your example it wold be:
b = new B((*this));
As for the other part, just foreward declare: (some random off-top-head code)
class X;class Y { ...};class X { ... };
But then again, you'll have to fix that to go with your files ;).
Good luck!
C++