联合体union未定义?解决办法

联合体union未定义?
//以下为类A
#include<B.h>
typedef union{
  int a;
  int b;
}def_t;
class A{

};
//以下为类B
#include<A.h>
class A;
class B{
 def_t def;
};

为什么报def_t未定义啊?


------解决方案--------------------
C/C++ code

typedef union tagDef_t{
  int a;
  int b;
}def_t;

------解决方案--------------------
为什么类A中要#include<B.h>?