View Single Post
Old Apr 15th, 2006, 1:11 PM   #7
rup
Newbie
 
Join Date: Jul 2005
Location: India
Posts: 14
Rep Power: 0 rup is on a distinguished road
I picked msgsnd from the book Beginning Linux Programming (Wrox).
It has the following prototype:
int msgsnd(int msqid, const void* msg_ptr, size_t msg_sz, int msgflag);
and is called this way in an example C program in the book:
msgsnd(msgid, (void*)&some_data, MAX_TEXT, 0);
where some_data is the structure:
struct msg{
    long int msg_type;
    char text[MAX_TEXT];
};

Yes, I meant to cast it.
rup is offline   Reply With Quote