I was writing some test code in C. By mistake I had inserted a ; after a #define, which gave me errors. Why is a semicolon not req
;
#define
define is a preprocessor directive, and is a simple replacement, it is not a declaration.
define
BTW, as a replacement it may contain some ; as part of it:
// Ugly as hell, but valid #define END_STATEMENT ; int a = 1 END_STATEMENT // preprocessed to -> int a = 1;