Site Tools


header-guard

**This is an old revision of the document!**

Table of Contents

Header guard

Header guards are a pattern used in C and C++ programming languages when writing header files. Header files are files that

A prototypical example of a header guard is the following

// hello_world.h
#ifndef __HELLO_WORLD_H__
#define __HELLO_WORLD_H__
 
struct Hello {
    const char *world;
};
 
#endif /* __HELLO_WORLD_H__ */
header-guard.1778763157.txt.gz ยท Last modified: by yanevskiv