sizeof(myArray[0])
#2

array dimensions must always have the same size
if you dont declare a size the compiler gets it, its always the size of the biggest row

because of that you can only get the size of the dimensions with sizeof
pawn Code:
const stock
    Array[][] = {
        {1, 2, 3, 4, 5},
        {1, 2, 3},
        {6, 9},
        {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
    },
    SizeD1 = sizeof Array,
    SizeD2 = sizeof Array[];
Reply


Messages In This Thread
sizeof(myArray[0]) - by MP2 - 30.09.2011, 17:01
AW: sizeof(myArray[0]) - by Nero_3D - 30.09.2011, 17:41
Re: sizeof(myArray[0]) - by MP2 - 30.09.2011, 17:46

Forum Jump:


Users browsing this thread: 1 Guest(s)