I am using the following printf
function:
printf("%-8s%-21s%-17s%-6s\n", "index", "Name", "Effect", "Type");
However, instead of "8", I'd like to use a pre-defined macro:
#define NAME_SIZE 8
When I tried to replace it, the IDE doesn't recognise it and gives the error: Invalid conversion specifier N
(the first letter of the macro). I tried putting the macro name in ()
brackets or putting an interval these but didn't work either. So I wonder: is it even possible to put a macro as a parameter in a printf
function and if yes, how? I am sorry for such a strange question but I couldn't find any information.