Take the tour ×  So, to start off, here's the code, with actual
names switched for generic ones to limit confusion.  /* Get the
list of Hotkey commands */ #define A_COMMANDS_MACRO(a, b, c, d)
a = b , enum { #include "commandsFile.def" } ;  This is a
snippet from some source code I have been looking over and
considering forking as a way to familiarize myself with the
intricacies of the C programming language. So, to my untrained
eye, this appears to do nothing. To my brain, defining something
and then immediately undefining it would seem to cancel each
other out.  Obviously, I realize that I'm wrong. But why am I
wrong?  share|improve this question The #define is applied to
containts of commandsFile.def file. Post it. –  ruslik Dec 18
'10 at 16:28 add comment  3 Answers  up vote 4 down vote
accepted  What you see there is usually called X-MACRO. The
technique consists in defining macros via #define, and then
including a file that makes use of them with #include.  As a
very simple example, you could have a head