home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH06 / A06177.WAV (.mp3) < prev    next >
Waveform Audio File Format  |  1993-10-21  |  380.7 KB  |  1 channel  |  11,025 sample rate  |  35 seconds
Transcription: 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.