tags:

views:

98

answers:

3

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;
+4  A: 

Perhaps you need a semicolon after the second struct declaration, like this:

struct cdlijst{ 
    CD *item;
    struct cdlijst *next;
};
Justin Ethier
+2  A: 

Some otherwise incomprehensible error messages (including this one) are due to things as simple as missing semicolons.

John Marshall
+2  A: 

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.

ZelluX