Quote:
Originally Posted by Natsheh
#define calculateArray2D(%1,%2,%3) _calculateArray2D(%1,%2,sizeof %3)
stock _calculateArray2D(array[][], num, size)
{
//some unimportant stuff here
}
Example >> calculateArray2D(2Darray[0], 2, 2Darray[])
Am not sure what are you trying to do it really depends on it.
|
I am trying to get the size of an array inside my include file without using an extra parameter. Is it possible?
Since you can't directly use 'sizeof' (gives error) I tried to it with a macro. It works fine, but only when I use 1 dimensional arrays.