tags:

views:

185

answers:

4

why doesn't this compile:

enum E { a, b}

typedef struct { int i; E e; } S;

int main(){return 0;}

I get different errors on different system.

+8  A: 

You need a semicolon after the enum.

enum E { a, b};
yjerem
Unfortunately that wasn't the error in the real thing, but I did find it. (Darn I hate C)
BCS
A: 

The enum needs an ; after its } ... What other errors are you seeing?

fbrereto
A: 

There is no semicolon after the enum.

Goz
A: 

no semi colon at the end of enum