I have several structs declared in a header file and everything is properly linked, but when i compile the .cpp file it gives me this error for every struct an constant:
error C2011: 'MTX' : 'struct' type redefinition
Why?
Printable View
I have several structs declared in a header file and everything is properly linked, but when i compile the .cpp file it gives me this error for every struct an constant:
error C2011: 'MTX' : 'struct' type redefinition
Why?
post code
either you have the header included multiple times or I don't know...
Wrap the entire code in the header with this:
at the start
#ifndef MY_STRUCT_DEFINITION_HEADER
#define MY_STRUCT_DEFINITION_HEADER
at the end
#endif
Replace that long name with anything you want.