+ 1
Can i define multiple macros in one line in c or c++?
Like we can declare multiple integers in one line Int a,b,c; so how can i declare multiple macros?
1 ответ
+ 4
No. Macros are different from language statements they are preprocessed and use whitespace to delimit tokens(single elements)
Macro definition must start and end with a new line.
A single macro can span multiple lines by using `\` but, multiple macros can't share single line.
#include<stdio.h>
#define spam while(1)\
printf("%d",0);
int main() {
spam
return 0;
}