您的位置:首页 > 其它

全局变量的用法

2008-04-09 01:42 232 查看
 三个文件pc_main.h,modpc_com.h,modpc_com.cpp

modpc_com.h中的内容
extern char com_file_name[30];//for comminication
extern int g_mqid;//it is the message queue id

modpc_com.cpp中的内容
#include "modpc_com.h"
int g_mqid=5;
char com_file_name[30]="shared_file";

pc_main.cpp中的内容
#include "modpc_com.h"
int main()
{
cout<

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  file