class test {
public:
static int n;
test () { n++; };
~test () { n--; };
};
int test::n=0; //<----what is this step called? how can a class be declared as an integer?
int main () {
test a;
test b[5]; // I'm not sure what is going on here..is it an array?
test * c = new test;
cout << a.n << endl;
delete c;
cout << test::n << endl;
}
其次,输出是 7,6 我不明白它是如何得到 7 的,从哪里来的?