Difference between revisions of "Preprocessor Macros"

Jump to navigation Jump to search
no edit summary
Line 1: Line 1:
Some common preprocessor macros
Some common preprocessor macros
==Include Guard==
For most modern compilers (VS Code, gcc, llvm), you can just add a <code>#pragma once</code> at the top.
Note that this is not defined in the standard.
For older compilers:
<syntaxhighlight lang="c">
... contents of grandparent.h
#endif /* !GRANDPARENT_H */


Navigation menu