Suppose I want something of this sort, in one .cpp source file:
.cpp
class A { public: void doSomething(B *b) {}; }; class B { publi
You need to forward declare B.
class B; class A { public: void doSomething(B *b) {} }; class B { public: void doSomething(A *a) {} };
(And BTW, you don't need the semi-colons after the member function curly braces. :) )