出处:http://www.cnblogs.com/hanxi/archive/2012/07/25/2608068.html
// A.h
#include "B.h"
class A
{
public:
A(B* pB):m_pB(pB) {}
void useB();
private:
B* m_pB;
}; //A.cpp
#include "A.h"
void A::useB()
{
//do something for m_pB
} //B.h
class A;
class B
{
public:
B(A* pA):m_pA(pA) {}
void useA(); private:
A* m_pA;
}; //B.h
#include "A.h"
#include "B.h"
void B::useA()
{
//do something for m_pA
m_pA = new A;
}