fanwei0731 发表于 2010-12-13 22:47:52

关于类型定义的一个疑问

我想请问一下,为什么在在类型定义的时候要加*pReportStruct,类型定义后不是直接就可以用ReportStruct定义了么?要指针干嘛?我看到很多程序都是这么写的,一直不明白。
typedef struct   _ReportStruct
{
int   ReportNum;
char    ReportCode;
structReportStruct* next;
structReportStruct* last;
}ReportStruct,*pReportStruct;

hemjidn 发表于 2010-12-14 01:12:18

多定义个指针而已,用不用随便你。用指针无需占用大量内存
页: [1]
查看完整版本: 关于类型定义的一个疑问