In file included from /usr/include/i386-linux-gnu/sys/shm.h:27:0,
from prog.c:4:
/usr/include/i386-linux-gnu/sys/ipc.h:24:3: warning: #warning "Files using this header must be compiled with _SVID_SOURCE or _XOPEN_SOURCE" [-Wcpp]
# warning "Files using this header must be compiled with _SVID_SOURCE or _XOPEN_SOURCE"
^
prog.c:9:1: warning: return type defaults to 'int' [-Wimplicit-int]
main()
^
prog.c: In function 'main':
prog.c:12:2: error: 'key' undeclared (first use in this function)
key-t key-10;
^
prog.c:12:2: note: each undeclared identifier is reported only once for each function it appears in
prog.c:12:6: error: 't' undeclared (first use in this function)
key-t key-10;
^
prog.c:12:8: error: expected ';' before 'key'
key-t key-10;
^
prog.c:15:24: error: expected ')' before numeric constant
shmid = shmget((key-1)10,SIZE,IPC_CREAT/0666);
^
prog.c:15:10: error: too few arguments to function 'shmget'
shmid = shmget((key-1)10,SIZE,IPC_CREAT/0666);
^
In file included from prog.c:4:0:
/usr/include/i386-linux-gnu/sys/shm.h:53:12: note: declared here
extern int shmget (key_t __key, size_t __size, int __shmflg) __THROW;
^
prog.c:18:2: error: 'integer' undeclared (first use in this function)
integer = (int*)shm;
^
prog.c:19:8: warning: implicit declaration of function 'fork' [-Wimplicit-function-declaration]
pid = fork();
^
prog.c:25:4: warning: implicit declaration of function 'sleep' [-Wimplicit-function-declaration]
sleep(2);
^
prog.c:27:4: warning: implicit declaration of function 'accessmem' [-Wimplicit-function-declaration]
accessmem(semid);
^
prog.c:37:4: warning: implicit declaration of function 'aceessmem' [-Wimplicit-function-declaration]
aceessmem(semid);
^
prog.c: In function 'accessmem':
prog.c:51:4: error: 'integer' undeclared (first use in this function)
(*integer)++;
^
prog.c:52:13: error: expected ')' before 'integer'
printf("\t"integer varible=%d",(*integer));
^
prog.c:52:31: warning: missing terminating " character
printf("\t"integer varible=%d",(*integer));
^
prog.c:52:13: error: missing terminating " character
printf("\t"integer varible=%d",(*integer));
^
prog.c:57:1: error: expected ';' before '}' token
}
^
prog.c:57:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^