?? p11.1.c
字號:
#include <stdio.h>#include <sys/types.h>#include <sys/ipc.h>int main(void){ key_t key; int proj_id; char* pathname="./p11.1.c"; proj_id=1; key=ftok(pathname,proj_id); if(key==-1){ perror("cannot generate the IPC key"); return 1; } printf("proj_id= %d pathname=%s IPC key=%d\n",proj_id,pathname,key); proj_id=2; key=ftok(pathname,proj_id); if(key==-1){ perror("cannot generate the IPC key"); return 1; } printf("proj_id= %d pathname=%s IPC key=%d\n",proj_id,pathname,key);}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -