I try to reference a struct from another class in my code and it gives me an error, saying I have a syntax problem.
That's the struct in Figure.h,
And that is where I reference it, from another header file called UI.h. I know there is a problem with referencing structures, I just don't know how to fix it. Simple problem, any one wanna help?
The problem is not that Figure Type is declared outside of Figure.h, or that it is private as opposed to public.
//Figure index
struct FIGURE_TYPE {
//Where to crop the image from
SDL_Rect crop;
int x;
int y;
};
That's the struct in Figure.h,
void set_camera ( SDL_Rect& camera, Figure::FIGURE_TYPE figure_index[FIGURE_COUNT] );
And that is where I reference it, from another header file called UI.h. I know there is a problem with referencing structures, I just don't know how to fix it. Simple problem, any one wanna help?
The problem is not that Figure Type is declared outside of Figure.h, or that it is private as opposed to public.