c - syntax error C2061 using structs -
got bit confused error i'm getting ...
so, in code snippet, have 2 structs :
typedef struct { char *cmake; model *testmodel; } make; typedef struct { char * cmodel; } model;
now, if compile, receive following errors :
error 1 error c2061: syntax error : identifier 'model' error 2 error c2059: syntax error : '}'
if comment model *testmodel
line, compiles fine ... ideeas ? thank !
declare model
type before make
:
typedef struct { char * cmodel; } model; typedef struct { char *cmake; model *testmodel; } make;
generally identifier name cannot used before has been declared.
Comments
Post a Comment