Device Monitoring Studio - Monitor, log and analyze data coming through PC ports and connections
Download Device Monitoring Studio 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