struct mystruct
{
int i;
double f;
} ;
typedef mystruct myotherstruct;
//the other .cpp file
struct mystruct; //OK,this is a correct forward declaration.
struct myotherstruct; // error C2371(in vc2k8): 'myotherstruct' : redefinition; different basic types
大家好。 为什么我不能转发myotherstruct?声明typedef类型
http://stackoverflow.com/questions/804894/forward-declaration-of-a-typedef-in-c – Jeeva 2012-07-19 10:47:25