So, if I understand correctly, you have two classes which each must know (have a reference) to each other. Lets assume you have a Teacher and Student class. Each Teacher teaches some Students and each Student knows who its Teacher is.
You could have classes like this:
#include "Student.h" // <- Include the Student class here
class Teacher; // <- Forward declare teacher
Student (Teacher *pTeacher);
#include "Teacher.h" // <- Only need to include Teacher.h because this includes Student.h
Since Student needs to reference Teacher and Teacher needs to reference Student, one of the references in one of the definitions needs to be a pointer. This is because in your class definition it needs to work out how much memory should be allocated for your class.
#include "Teacher.h" // <- This includes Student
If you have:
and consider the case of class B in terms of the amount of memory required, B needs enough memory to accomodate class A which needs enough memory to accomodate class B, which needs enough memory to accomodate class A etc etc etc...
Hopefully this is clear.