home *** CD-ROM | disk | FTP | other *** search
- If you declare a member function to be static, it can access only
- those data members declared to be static. In this example,
- the static member function leapyear() is called first for the
- object storm. That syntax is legal, but is misleading because the
- function cannot access any data members belonging to the instance
- "storm" of the class Weather. The second call of the leapyear()
- function uses the scope resolution operator for the class. This
- latter form is preferable because the function is associated with
- the class and not with a specific Weather object.
-