I'm doing an introductory course to C programming, and we've just started defining macros. I'm supposed to define the macro CHECK that prints msg (a string) if cond is false, however, it doesn't print the msg to the stdout stream, whether cond is true or false. Any ideas?
1 #define CHECK(cond, msg) if(!cond) fprintf(stdout, "%s", msg)