If you want pointer to an array, you can do it like this:
GLfloat (*points)[80] = serieLine;
points
will point to the first row of serieLine
. If you increment points
, it will point to the next row.
Question
I am bit struggling with kinda easy task. I need to convert array to pointer.
GLfloat serieLine[8][80]; GLfloat *points = &serieLine[0][0];
this gives me just first value, but how can I get all values in the array?
Solution
If you want pointer to an array, you can do it like this:
GLfloat (*points)[80] = serieLine;
points
will point to the first row of serieLine
. If you increment points
, it will point to the next row.
OTHER TIPS
Increment the pointer, and it'll point at the next value in the array (so once you've incremented it 8*80 times you'll have seen all of the values)