ive got a struct problem it returns:
cd.h:15: error: two or more data types in declaration specifiers
its probably something simple ...
struct cd {
char titel[32];
char artiest[32];
int speelduur;
};
typedef struct cd CD;
struct cdlijst{
CD *item;
struct cdlijst *next;
}
开发者_如何转开发 typedef struct cdlijst CDLijst;
Perhaps you need a semicolon after the second struct declaration, like this:
struct cdlijst{
CD *item;
struct cdlijst *next;
};
Some otherwise incomprehensible error messages (including this one) are due to things as simple as missing semicolons.
The answer is that you missed a semi-colon at the end of declaration of struct cdlijst, add a semi-colon will fixes the problem.
By the way, I would like to recommand Clang for syntax correcting, since it will give much better explanations on compiling errors. Here is an article comparing gcc and Clang on error recovery messages: http://blog.llvm.org/2010/04/amazing-feats-of-clang-error-recovery.html.
精彩评论