1.头文件中声明:
static int testInt;
2.源文件中初始化:
int RJkThread::testInt=0; //添加位置在#include下方,类的外面。
其他地方即可调用。
转载于:https://blog.51cto.com/xfqxj/593529
1.头文件中声明:
static int testInt;
2.源文件中初始化:
int RJkThread::testInt=0; //添加位置在#include下方,类的外面。
其他地方即可调用。
转载于:https://blog.51cto.com/xfqxj/593529