Hi,
I wrote the following macro:
#define COM "
#define GET_VAR_LINE(var, type) COM var = %type COM, var
So, this code :
int main()
{
int x = 0;
printf(GET_VAR_LINE(x, d));
}
expands to
int main()
{
int x = 0;
printf(" x = %d ", x);
}
Acquired with g++ -E main.cpp
How do I eliminate the spaces at the beginning and the end of
" x = %d " ? Thanks.