1、创建新项目 - Windows桌面向导
2、选择桌面应用程序
3、创建global.h 和 global.cpp
global.h
#pragma once
extern int test;
class global
{
};
global.cpp
#include "global.h"
int test = 0;
C++中多线程共享变量及具体读/写实现
阅读 79
2022-01-22
1、创建新项目 - Windows桌面向导
2、选择桌面应用程序
3、创建global.h 和 global.cpp
global.h
#pragma once
extern int test;
class global
{
};
global.cpp
#include "global.h"
int test = 0;
相关推荐
精彩评论(0)