Suppose I want something of this sort, in one .cpp
source file:
class A {
public:
void doSomething(B *b) {};
};
class B {
publi
You can try a forward declaration like
class B;
class A {
void Method( B* );
};
class B{
};
but you will only be able to declare pointer and reference variables for B then. If you want more (like a method that dereferences B* variable) you can provide a declaration only and define methods later in the same file - at the point where both classes declaration is already available.