I have a problem with recursive imports in C++. I have this 2 classes:

//File A.h
#include "B.h"

class A{
public:
A(){};

void doA(B b){ b.doB(); }
}

//File B.h
#include "A.h"

class B{
public:
B(){};

void doB(A a){ a.doA(); }
}

I tried to use forward declarations but it doesn't work because i call methods "doA" and "doB" so I cant use forward declarations.

Do someone know what can I do to compile it?

Thank you!