iandobrien
Programmer
Hi,
just wondering if anyone might be able to help me out with this problem im having using structs in C++. I am trying to add a number to a 2D array that is a member of the struct but i am getting an "access violation" at runtime..Below is the code..thanks
typedef struct
{
unsigned int **red;
}rgbimage;
//and then i declare the struct..
rgbimage* image;
//and further down in my code
image->red[0][0] = 1;
just wondering if anyone might be able to help me out with this problem im having using structs in C++. I am trying to add a number to a 2D array that is a member of the struct but i am getting an "access violation" at runtime..Below is the code..thanks
typedef struct
{
unsigned int **red;
}rgbimage;
//and then i declare the struct..
rgbimage* image;
//and further down in my code
image->red[0][0] = 1;