I’m trying to recreate this line from the PAC Control User Guide, Page 346, on Pointer Tables.
ptTable6[2] = &stStrT1[0];
I keep getting an error when compiling ’ Error on line XX: syntax error at or near “[” ’
Really, I want a pointer variable to point to an element in a float table (which also doesn’t want to work) but I thought at least I could get the book example to work.
Any advise on how to get pointers to reference a table element would be great!
Thanks
Eric
I think that is a mistake in the User Guide (@GrayChurch.Opto22) . I don’t think you can create a pointer to an element of a table, only to the entire table itself.
Thanks Philip, that’s what I suspected. I was looking to make some elaborate indexing more readable.
So instead of something like using the following over and over:
stProfile_Variables[nIndex * 5 + 15] = stProfile_Variables[nIndex * 5 + 15] - stProfile_Variables[nIndex * 5 + 14] ;