#include<iostream.h>
class Myclass
{ public:
Myclass( );
Void print( );
~Myclass( );
private:
int i;
static int j;
};
int Myclass::j=0;
Myclass::Myclass( )
{ cout<<”this is a constructor!”<<endl;
j+=10; }
void Myclass::print( )
{ cout<<”the value of j is “<<j<<endl; }
Myclass::~Myclass( )
{ cout<<”this is a destructor!”<<endl; }
void main( )
{ Myclass first , second ;
first.print( );
second.print( );
}