CLion
 
Get CLion
You are viewing the documentation for an earlier version of CLion.

Header guards

Last modified: 11 February 2024

Header guard is a pattern of preprocessor directives that protect your header from being included multiple times. Header guard wraps the entire code content into an #ifndef (#if !defined, or another similar) block: