I have two classes in the same .cpp file:
// forward class B; class A { void doSomething(B * b) { b->add(); } }; class B { void a
Move doSomething definition outside of its class declaration and after B and also make add accessible to A by public-ing it or friend-ing it.
doSomething
B
add
A
public
friend
class B; class A { void doSomething(B * b); }; class B { public: void add() {} }; void A::doSomething(B * b) { b->add(); }