Summary

In this hour you learned more about creating classes.

You learned how to create constant member functions, and the differences between a class's interface and the implementation of a class's methods.

It is good programming practice to isolate the interface—or declaration—of the class in a header file. You usually do this in a file with an .HPP extension. The implementation of the class methods is written in a file with a .CPP extension.

Get Sams Teach Yourself C++ in 24 Hours, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.