O'Reilly logo

Sams Teach Yourself C++ in 24 Hours, Third Edition by Jesse Liberty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing Class Methods

Every class method that you declare must also be defined.

A member method (or member function) definition begins with the name of the class and is then followed by two colons, the name of the function, and its parameters.

A member method (or member function) definition begins with the name of the class followed by two colons, the name of the function, and its parameters. Listing 7.1 shows the complete declaration of a simple Cat class and the implementation of its accessor function and one general class member function. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required