Separating class code into a header and cpp file
The class declaration goes into the header file. It is important that you add the #ifndef include guards. Most compilers now also support #pragma once. Also I have omitted the private, by default C++ class members are private. and the implementation goes in the CPP file: