Whay we use #define _class #ifndf _class #endif ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Whay we use #define _class #ifndf _class #endif ?

what will happen if we ignore this?

21st Oct 2016, 11:01 PM
Eli Sadikov
Eli Sadikov - avatar
1 Answer
+ 3
these macros(called header guards or include guards) are used to avoid conflicts in names. If you try to include the same header 2 or more times(even indirectly) you get an error.
21st Oct 2016, 11:26 PM
Evgeniy Dudnik
Evgeniy Dudnik - avatar