I've made the following code, which is in my include:
#define calculateArray(%1,%2) _calculateArray(%1,%2,sizeof %1)
stock _calculateArray(array, num, size)
//some unimportant stuff here
Since I can't access directly to the sizeof function inside my include file (and I don't want to manually pass the parameter), I've created a macro that will automatically do that for me.
My problem is that it works fine when I use it like this:
But I get an error when I try to use it like this:
WARNING : expression has no effect
ERROR : expected token: "]", but found "-integer value-"
ERROR : expected token: ";", but found "]"
ERROR : invalid expression, assumed zero
I think that the macro passed "sizeof array" thus making an error. Some workaround for this?
Thanks in advance.