Possible Duplicate:
Defining static members in C++
I am working little bit on C++, and I don't understand how to use static fields in C++, they seem useless. Please correct me.
I cannot do that:
class AClass{
    public:
        static int static_field = 0;
};
AND THAT does not work either
class AClass{
    public:
        static int static_field;
};
int main(){
    int AClass::static_field = 0;
    return 0;
}
 
     
     
     
     
    