15.2) Exercise 23
- Split up your solution to Exercise 22 in the manner suggested by the example seen earlier. Use the same filenames as that example: data.cpp, stats.cpp, main.cpp.
- Create a header file called data.hpp containing prototypes for the three functions defined in data.cpp and stats.cpp. Make sure that main.cpp contains a
#include
directive for this header file. - Use the g++ command seen earlier to compile your program from these three source files. If you get compiler errors, double-check that all three files have the necessary
#include
directives in them.