I'm following this tutorial about the basics of Code::Blocks projects. To use multiple files in a project, you need a header file. This section gives the source code for the most basic of header files, but gives no explanation.
#ifndef HELLO_H_INCLUDED
#define HELLO_H_INCLUDED
void hello();
#endif // HELLO_H_INCLUDED
I got curious about the significance of HELLO_H_INCLUDED
. I changed it to various names, and the project parsed and ran properly regardless of what I named it.
However, if you delete HELLO_H_INCLUDED
entirely, it an error arises saying no macro name given in #ifndef directive
.
So, explain to me like I'm five years old: What is a macro name, what does it do, and why is it required?