A89: Re: Re: Re: Re: Arrays


[Prev][Next][Index][Thread]

A89: Re: Re: Re: Re: Arrays




> It should be 32. How where you calculating it? If it was this code (from
> your previous message):
>
> sizeof(unsigned short)*TILE_HEIGHT
>
> and TILE_HEIGHT is 16, the result should be 32. How is TILE_HEIGHT
defined?

TILE_HEIGHT is defines as 16, and doing sizeof(unsigned short)*TILE_HEIGHT
generates 32.

I have my array set up like:

unsigned short pic[3][] = {
    {/*16 numbers*/},
    {/*16 numbers*/},
    {/*16 numbers*/}
}

Then, how many bytes I needed to add, I tried "&pic[1][0]-&pic[0][0]", which
gave me 16, not 32 like I expected.

B Clark




References: