#include \"DLLDefines.h\"
#include \"DLLDefines.h\"
The above actually passed compilation, but why?
It depends on the header file; there is no language restriction on multiple includes of the same file.
Some files are designed to be included multiple times (e.g.
can be included multiple times to turn 'on' and 'off' assert
).
Many files are safe to be included multiple times because they have include guards, others are not and should be included only once in a translation unit or even a program.