The project structure

The project uses three functions: the main function, which calls two functions print_name and print_time. These are in three separate source files and, since the main function will call the other two functions in other source files, this means the main source file will have to have prototypes of those functions. In this example, that means a header for each of those files. The project will also use a precompiled header, which means a source file and a header file. In total, this means three headers and four source files will be used.

Get Beginning C++ Programming 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.