04.07.2012, 12:40
Hi guys,
How can I calculate, how many numbers is in 2D array element? Or it's impossible?
If I use sizeof, I get errors:
Thanks!
How can I calculate, how many numbers is in 2D array element? Or it's impossible?
pawn Code:
new
array1[ ][ ] = {
{ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, // there is 9 numbers
{ 1, 2, 3, 4, 5 }, // there is 5 numbers
{ 1, 2, 3, 4, 5, 6 }, // there is 6 numbers
}
;
pawn Code:
printf( "%d", sizeof( array1[ 0 ] ) );