Pointing to struture members.....
What I would like to do is set up a ptr to point to a specific member of an array of structures. Now this pointer will be passed to my draw function and can be changed by user input. Essentially we have something like as follows:
So my questions are:
ptr -> struct.member
//after user input
ptr -> struct.member2
1. I know all the members it will be pointing too are double's thus can I declare ptr as a double?
2. Do I just point to the first member of the array of structures during initalization?
3. If so, how do I access the rest of the specific members, located under other index numbers (i.e. struct.member vs struct.member, accessed with the pointer)?
Thanks, andy help would be greatly appreciated.