Mail Archives: djgpp/1997/11/02/01:50:33
Erik Max Francis <max AT alcyone DOT com> wrote:
>Brett Kosinski wrote:
>
>> Actually, I believe this is correct. Are you sure you are malloc'ing
>> the
>> pointers before trying to access them?
>
>Yes, it's correct.
>
>> *tiledata[ptrNum][dataNum].dat <-- you have to dereference the
>> pointer.
>
>This is incorrect. . has higher precedence than *, so this is
>syntactically wrong. What you meant is
>
> (*titledata[ptrNum][dataNum]).dat,
>
>or more appropriately,
>
> titledata[ptrNum][dataNum]->dat,
>
>which is what the -> operator is for.
I thought I did that wrong... oh well, my C is a little bit rusty... (I have
to use Pascal in Comp Sci, so C has been on the backburner for a while now. :)
Brett.
- Raw text -