Programming: Using #ifndef #define and #endif in the Header File so the Code Only Compiles Once
Share
A header file needs a mechanism to only allow the code to compile once, even if the header file is included in other files more than once. The #ifndef is used for this purpose.
Usage: #ifndef uniqueName #define uniqueName //Code to be compiled only once #endif