Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |
| c-header-guard [August 22, 2026 at 17:24] – Ivan Janevski | c-header-guard [August 26, 2026 at 15:46] (current) – external edit 127.0.0.1 |
|---|
| # C Header guard | # C header guard |
| |
| **[Header guard](https://en.cppreference.com/w/c/preprocessor/conditional)** is a C/C++ pattern that prevents multiple inclusion of the same header file by wrapping declarations in preprocessor conditionals. The pattern uses `#ifndef`, `#define`, and `#endif` to ensure declarations are processed only once, even if the header is included multiple times. | **[Header guard](https://en.cppreference.com/w/c/preprocessor/conditional)** is a C/C++ pattern that prevents multiple inclusion of the same header file by wrapping declarations in preprocessor conditionals. The pattern uses `#ifndef`, `#define`, and `#endif` to ensure declarations are processed only once, even if the header is included multiple times. |