View Single Post
  #4 (permalink)  
Old April 29th, 2006, 07:16 AM
C@uark C@uark is offline
Authorized User
 
Join Date: Oct 2004
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to C@uark
Default

If you wanted to increment the array index to next contiguous element and then the dereference the pointer in the array in one fail swoop. This might work don’t know for sure, I don’t have a complier on me, but the order of it seems logical.

If Ptr is the array variable name (which by default contains the address of the first element) given to your array of structs.

(*(Ptr++)).last_name // should evaluate address of pointer array increment it to the next contiguous element, then dereference the pointer stored inside with '*' and select the member last_name with dot operator. If thats more along the lines of what your referring to.
Reply With Quote