Description. In the C Programming Language, the #ifndef directive allows for conditional compilation. The preprocessor determines if the provided macro does not exist before including the subsequent code in the compilation process.
What does Ifdef mean?
ifdef means "if the following is defined" while ifndef means "if the following is not defined".
What is the purpose of #ifndef?
#ifndef and #define are known as header guards. Their primary purpose is to prevent C++ header files from being included multiple times.