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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -