Good evening,
I'm trying to allocated share memory and i get the error
sh.c: In function `main':
sh.c:14: error: parse error before ';' token
My program is like that :
What do i do wrong?Code:#define SHMSZ 40; int main() { key_t key; int shmid; if((key = ftok("path of user", 0)) < 0){ printf("\n%d Error in key\n",key); return 0; } printf("%d\n",key); shmid = shmget(key,SHMSZ,(IPC_CREAT | 0666)); /* the error appears here inside shmget*/ }
Thanks, in advance!



LinkBack URL
About LinkBacks


