sizeof 2D array
#1

Hi guys,

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
    }
;
If I use sizeof, I get errors:
pawn Code:
printf( "%d", sizeof( array1[ 0 ] ) );
Thanks!
Reply


Messages In This Thread
sizeof 2D array - by zgintasz - 04.07.2012, 12:40
Re: sizeof 2D array - by Vince - 04.07.2012, 12:57
Re: sizeof 2D array - by zgintasz - 04.07.2012, 13:09
Re: sizeof 2D array - by Vince - 04.07.2012, 13:17
Re: sizeof 2D array - by zgintasz - 04.07.2012, 13:19
Re: sizeof 2D array - by Vince - 04.07.2012, 13:27
Re: sizeof 2D array - by zgintasz - 04.07.2012, 13:33
Re: sizeof 2D array - by zgintasz - 05.07.2012, 08:41

Forum Jump:


Users browsing this thread: 2 Guest(s)