I have created class A in a.h and a.cpp,and class B in b.h and b.cpp;

One method of A needs B,like this,
Qt Code:
  1. class A
  2. {
  3. ...
  4. void method_A1(B b);
  5. ...
  6. }
To copy to clipboard, switch view to plain text mode 
So the file b.h needs to be included in a.h.

now one method of B needs A,like this,

Qt Code:
  1. class B
  2. {
  3. ...
  4. void method_B1(A b);
  5. ...
  6. }
To copy to clipboard, switch view to plain text mode 
So the file a.h needs to be included in b.h.

the program runs normally,but I think the two header files are included each other,it is odd.

Could you tell me how to deal with it normally?