Hex Editor - Binary File Editing Software for Windows
Download Hex Editor Neo Hide this button

#pragma once Directive

#pragma once directive prevents the file from being included multiple times.

Syntax:

#pragma once

Let fileA.h be #include-ed into fileB.h and into fileC.h. If you now write a fileD.h with the following two lines:

#include "FileB.h"
#include "FileC.h"

“fileA.h” will get included twice. In order to prevent this, put a following line into the “fileA.h” file:

#pragma once