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