大佬们帮忙看个小代码,这个程序没看懂,能不能每步详细说下
#include < iostream >using namespace std ;
class Test{
static int count;
public:
Test( ) {count++;}
~Test( ) { count --; }
static void disp(){cout<<count<<endl;}
};
int Test::count=10;
void main( )
{
Test::disp( );
Test tl; tl. disp( );
Test t2; t2. disp( );
Test* p=new Test;p->disp( );
delete p;
Test::disp( );
}