This illustrates writing simple classes (using just types like strings and arrays; there are no container classes like vector or map) in a multi-file project. Files:
phonebook.h
: classes for
tracking phone numbers
phonebook.cpp
:
implementation of the phonebook class (the entry class is all inline)
main.cpp
: test bed
Makefile
: build file for
command-line make
(using g++
). You can also
build the code in CLion or by typing g++ *.cpp