Hello, I have a problem with the following structure declaration: typedef struct { HDEntriesTYPE HDWindowStartSTRUCT; } actualPlayerStatusTYPE; typedef struct { unsigned long StartClusterUL; unsigned long FileSizeUL; unsigned char FileNameUC[HD_MAX_NAME_LENGTH]; // 40 Characters + ".mp3" + \0 } HDEntriesTYPE; This should generate a type structure named "actualPlayerStatusTYPE" which contains a structure "HDWindowStartSTRUCT" of the type HDEntriesTYPE. But when I compile the above declarations I get two compiler error messages: C141: syntax error near 'HDEntriesTYPE' and C129: missing ';' before HDWindowStartSTRUCT I don't no where is the problem. Can anybody give me a hint?! Thanks. RoGeR
The only thing wrong is that the order is reversed. The declaration of HDEntriesType must preceed its use, thus:
typedef struct { unsigned long StartClusterUL; unsigned long FileSizeUL; unsigned char FileNameUC[HD_MAX_NAME_LENGTH]; // 40 Characters + ".mp3" + \0 } HDEntriesTYPE; typedef struct { HDEntriesTYPE HDWindowStartSTRUCT; } actualPlayerStatusTYPE;
I'm such a ...!!! Of course you're right! Thank's a lot. RoGeR
No problem - we all end up there once in a while!