Include Guards
Prevents multiple inclusions of header file . Consists of preprocessor directives to make sure the header file is only included once despite being declared in multiple places.
#ifndef MY_HEADER_FILE_H
#define MY_HEADER_FILE_H
...
#endif // MY_HEADER_FILE_H
Code Formatting
Another way to ensure a good code structure is following a consistent format and style. This makes reading code easier for everyone.