Help with 2d array of structures and pointers.
Hello everyone. I need a little help with my assignment trying to get pointers to reference a 2d array of structures.
Here's the original code:
Code:
//this is global
struct structFractal{
uchar R, G, B;
} fractal[ySize][xSize];
A function goes through a bunch of for loops to generate the fractal:
Code:
fractal[y][x].R = LUT[color].R;
fractal[y][x].G = LUT[color].G;
fractal[y][x].B = LUT[color].B;
It compiles and works fine with this, but i like i said i have to change it so it uses pointers to reference the arrays... I'm lost.