>>> 此貼的回復 >> 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; }