Chapter 13. Multifile Programs

In previous chapters we’ve seen how the various parts of a C++ program—such as class declarations, member functions, and a main() function—are combined. However, the programs in those chapters all consisted of a single file. Now let’s look at program organization from a wider perspective, involving multiple files. We’ll see how communication is carried out among files, and how header files fit into the picture.

Besides discussing multifile programs in general, this chapter will introduce some longer and more ambitious applications. ...

Get Object-Oriented Programming in C++, Fourth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.