#include <iostream>
using std::cout;
using std::endl;
#define TOTAL 3
class Test {
public:
static int sCounter;
Test() { sCounter++; };
~Test() { sCounter--; };
};
int Test::sCounter = 0;
int main()
{
Test o;
Test b[TOTAL];
Test *p = new Test;
cout << o.sCounter << endl;
delete p;
cout << Test::sCounter << endl;
return 0;
}
/*
run:
5
4
*/