正在加载图片...
65静态成员和对家组织 (++ C+十 4+十 ++ 例1:静态数据成员的应用(与教材例题不同) #include <iostream. h> #include <string. h> class st n i char*name,*num;∥学生姓名、学号。 static int total;∥学生总人数,静态数据 public: st n(char char * st n() void print()例1:静态数据成员的应用(与教材例题不同) #include <iostream.h> #include <string.h> class st_n { public: }; st_n(char *, char *); ~st_n( ); void print( ); char *name, *num; //学生姓名、学号。 static int total; //学生总人数, 静态数据 §6.5 静态成员和对象组织
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有