The Static Data Member of a class is like a global variable. Once it is defined the static member will be initialized to zero. When the static member is declared inside the class it should be defined outside of the class. Static Data Member of a class will be common to all the objects which are declared in the class.
static int count; //static Data Member Declaration
int stat::count; //static Data member Defintion
static int countt;
In this example class count has a static data member countt.This program is used for counting the number of objects which is declared in the class.So when an object c1 access the function dispcount() the static variable has the value 1.when s5 access the function the value will be incremented to 5.
Once the static data member is defined it is automatically initialized to zero.