Here is a short read to refresh on how to best structure a C++ program.
||Structure of a program – C++ Tutorials
The best way to learn a programming language is by writing programs. Typically, the first program beginners write is a program called “Hello World”, which simply prints “Hello World” to your computer screen. Although it is very simple, it contains all the fundamental components C++ programs have: