local.h

来自「Linux MessageQueue Sample code」· C头文件 代码 · 共 19 行

H
19
字号
  /* Common header file for 2nd Message Queue Example      */  

#define _GNU_SOURCE 
#include <cstdio> 
#include <cstring> 
#include <sys/types.h> 
#include <sys/ipc.h> 
#include <sys/msg.h> 
#include <unistd.h> 
const char     SEED  ='M';        // Common seed for ftok 
const long int SERVER=1L;         // Message type for server 
typedef struct
{ 
	long int msg_to;                // Message in queue for this type 
	long int msg_fm;                // Placed in the queue by this type 
	char buffer[BUFSIZ];            // The actual message 
}MESSAGE; 
using namespace std; 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?