#2
tt1382019-07-03 02:13
|
#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( );
}