I have two classes A and B each having member functions returning as output the other class's object instance. The classes are implemented in different header files.
I tried using the forward declaration, i.e. including the header of class B in source code of A and forward declaring class A in source code of class B without including header A in source code of B. Then I noticed that I can only define pointers to class A in source code of class B which is not really useful without having the ability to create an object instance of class A.
does anyone have any ideas how to get around this problem??