#include < iostream. h >
class Class
{
public:
static int var;
Class()
{
var++;
}
};
int Class :: var = 0;
void main()
{
cout < < ″Class :: var =″ < < Class :: var < < endl;
Class c1 ;
cout < <″c1. var=″ < <c1. var < <endl;
Class c2, c3 ;
cout < < ″c2. var =″ < < c2. var < < endl;
}
CLASS :: VAR=0
C1.VAR=1
C2.VAR=3