I have a macro definition in header file like this:
// header.h
ARRAY_SZ(a) = ((int) sizeof(a)/sizeof(a[0]));
This is defined in some header file, which includes some more header files.
Now, i need to use this macro in some source file that has no other reason to include header.h
or any other header files included in header.h
, so should i redefine the macro in my source file or simply include the header file header.h
.
Will the latter approach affect the code size/compile time (I think yes), or runtime (i think no)?
Your advice on this!