I need help solving two macro questions in C++.
Define a macro PANIC that expands to code that uses cout to print the word PANIC and then calls a function quit (with no arguments).
I think the answer is
but the compiler gives me errors.
My second question is:
Define a macro PLUS1 that accepts a value as a parameter and produces an expression representing 1 more than the value.
My wrong answer was
#define PLUS1 (x)
If you know the answer, please tell me - also explain how you got the answer.