The header is a preview of what is defined in the code.

So a .h is a PREVIEW of what is coming - we don't need the code here, bit we know it is defined elsewhere.

The .cpp is the actual working code.

Think of how global functions work you define them at the top of the code then elaborate and write their code at the bottom of the code block. (assuming you are doing them above and below the int main() block).