中国人寿校园招聘咋样:#include<stdio.h>

来源:百度文库 编辑:神马品牌网 时间:2024/05/06 08:17:37
#include<iostream.h>
class Example
{
public:
static int svar;
static void display() //静态函数
{
cout<<"\nthe static variable is:"<<endl;
}
};

int Example::svar=100;

int main()
{
Example::display(); //访问方式1

Example e;
e.display(); //访问方式2
return 0;
}