What exactly do C include guards do?
问题 I have a question regarding include guards in C. I\'ve done a bit of reading but would appreciate a little bit of clarification. Let\'s say I have a header file \"header.h\" with a function definition. #ifndef HEADER_FILE #define HEADER_FILE int two(void){ return 2; } #endif This header file has an include guard. However, I\'m kind of confused as to what #define HEADER_FILE is actually doing. Let\'s say I were to forget the include guard, it would have been perfectly legal for me to