Mail Archives: djgpp/1997/07/21/20:22:45
> > int *mmp;
> > mmp = (int *) (&mapmake[0][0]);
> The cast here is completely misleading and actually implies that you're
> trying to do something tricky when you're in fact not. mapmake[0][0] is
> of type int. Therefore &mapmake[0][0] is of type int *. Real simple.
Yeah, real simple if you know it already. The hardest area I found to learn
with C when I started it about 6 years ago was the pointer stuff. I just
remember the casting explaining it better to myself by being clearer.
the &mapmake[0][0] to a _new_ user of C points to the first location of
the array, and the (int *) is obviously converting it...
I was just trying to be clear...
> > void passit(mmp);
> . . . And this is an invalid function call.
Oh well, I made a typo... strike me with lightning...
Leathal.
- Raw text -