Suppose i have two classes, A and B, each one implemented on their own .cpp and .hpp . Class A has some class B atributes and some of it's methods use B class methods. Same thing happens the other way around.
What is the most elegant/correct way to solve this?
( Here http://www.cplusplus.com/forum/general/125/ , patrickwa uses forward declarations, and includes A.hpp in B.cpp, and B.hpp in A.cpp . Is that the correct way of doing it?)