I need help solving two macro questions in C++.
They are:
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
#define PANIC;
cout <<quit();
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)
PLUS1+1
If you know the answer, please tell me - also explain how you got the answer.
Thanks!
C++