Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Error C2061 in visual studio,

$
0
0
I try to reference a struct from another class in my code and it gives me an error, saying I have a syntax problem.

//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.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>