摘要:
// 1 静态成员变量//从本章开始我们将学习类中的一些特殊成员,这些成员分为三大种--变量 函数 和指针//本节我们将接触类的第一个特殊成员--静态成员变量或者说静态成员数据//在此之间,我们学到的类的对像中的变量一般都是这个对像所专有的,它是该对像区别于其他对像的一个标志//不能为其他对像共享使用/*#include <iostream>using namespace std;class A{public: A(int i){this->age = i; A::total++;} ~A(){ A::total--; } int get(){ return this-> 阅读全文
posted @ 2012-07-28 00:19
简单--生活
阅读(223)
评论(0)
推荐(0)