class person { private 3360 string name; 静态int age; //静态变量public : person (conststringnm ) : name (nm ) {}void Print ) {cout name ‘ is ‘ age endl; //类中也包含}静态int get age () {return age; }staticvoidsetage(intvage ) /静态函数参数不应与静态变量同名) {age=vage; }; int Person:age=20; //静态变量必须初始化int main () person :3360 setage (32 )。 //Personman(Hello )不需要实现类即可使用的std:cout man.GetAge () std:endl; man.Print (; }