Reputation: 5523
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;
Upvotes: 3
Views: 1590
Reputation: 72655
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.
Upvotes: 3
Reputation: 7005
Some otherwise incomprehensible error messages (including this one) are due to things as simple as missing semicolons.
Upvotes: 3
Reputation: 134157
Perhaps you need a semicolon after the second struct declaration, like this:
struct cdlijst{
CD *item;
struct cdlijst *next;
};
Upvotes: 5