当前位置:Linux教程 - Linux文化 - gcc 编译,程序中不支持定义结构么?

gcc 编译,程序中不支持定义结构么?


>>> 此贴的回复 >> sys/msg.h defines struct msgbuf as a template for the struct to be used as the argument for msgsnd and msgrcv

#include #include #include #include #include

struct msgbuf{ int mtype; char mtext[1]; }tt,*pp;

int main() { long lType; memset(&tt,0x00,sizeof(tt)); pp=&tt; lType=tt.mtype; lType=pp->mtype; return 0; }