View Single Post
Old 05-09-2006, 04:32 AM   #3 (permalink)
tvqpriqphh
Registered User
 
Join Date: May 2006
Posts: 4
tvqpriqphh is on a distinguished road
nesvarbu:
it is true that a three dimensional array is a triple pointer

typeof(points) == GLfloat * * *


however, if you specify array offsets, those pointers get dereferenced

typeof(points[0]) == GLfloat * * (equivalent to *(points+0))

typeof(points[0][0]) == GLfloat * (equivalent to *(*(points+0)+0))

typeof(points[0][0][0]) == GLfloat (equivalent to *(*(*(points+0)+0)+0))

the compiler might be having trouble with the order of operations, perhaps you should try this syntax:

Code:
&(points[0][0][0])
now you dereference the triple pointer first and take the address of the result

typeof(&(points[0][0][0])) == GLfloat * (equivalent to &(*(*(*(point+0)+0)+0)))
tvqpriqphh is offline   Reply With Quote