I want to replicate some code snippets using the C preprocessor. I know how to handle multi-line macros, but I am facing two difficulties:
I didn't find a way to embed comments in the macro,
The generated output doesn't have newlines.
E.g. here is what I would like to be able to do
#define Snippet \
// This is my snippet \
a= b + c;
(sort of).
Desired generated output:
// This is my snippet
a= b + c;
Do you have solutions for 1. and 2. ? Thanks in advance.