使用类中函数或者变量时
1、使用类中函数时,标准c++需要类实例化或者类中的函数是static 类名::函数
2、使用类中参数时,标准c++需要类实例化或者类中的变量是static 类名::变量
定义 static变量之前不需要再加static
int Integer::b = 0;
Integer Integer:: getNum(int value)
1、使用类中函数时,标准c++需要类实例化或者类中的函数是static 类名::函数
2、使用类中参数时,标准c++需要类实例化或者类中的变量是static 类名::变量
定义 static变量之前不需要再加static
int Integer::b = 0;
Integer Integer:: getNum(int value)