Hey all,
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:Code:ptr -> struct.member draw (ptr) //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[3].member vs struct[4].member, accessed with the pointer)?
Thanks, andy help would be greatly appreciated.