is it possible to call macro inside a macro in this way:
#include <stdio.h>
#define AA(a1, a2) a1, 3, 5, a2
#define BB(x, y1, y2, y3, y4) { printf("%d %d %d %d %d\n",x, y1, y2, y3, y4 ); }
int main ()
{
int n = 21, k= 11;
BB(31, AA(n,k));
}
this code returns the followinf error in the compilation:
test_macro.c: In function ‘main’:
test_macro.c:9:18: erreur: macro « BB » requiert 5 arguments, mais seulement 2 ont été passés
test_macro.c:9:4: erreur: ‘BB’ undeclared (first use in this function)
test_macro.c:9:4: note: each undeclared identifier is reported only once for each function it appears in
}?