Introduction
Include guards stop a file from being included more than once. This helps avoid errors when the same code is added multiple times.
When you write a header file that might be included in many places.
When you want to prevent duplicate definitions of functions or variables.
When your project has many files including the same header.
When you want to keep your code safe from multiple inclusions causing errors.