i have thing this:
#define num1 6 #define num2 3
i want multiply these 2 macros , convert it string , store in 1 more macro. please give suggestions how this.
if want have third macro result of multiplying these 2 numbers, can this:
#define num1 6 #define num2 3 #define num3 (num1*num2)
you can print this:
printf("num3=%d\n", num3);
if want store value in string, can this:
char num3str[10]; sprintf(num3str, "%d", num3);
Comments
Post a Comment