-1

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.

1
  • something about having 2 types before the e.
    – BCS
    Aug 27, 2009 at 16:23

4 Answers 4

8

You need a semicolon after the enum.

enum E { a, b};
1
  • Unfortunately that wasn't the error in the real thing, but I did find it. (Darn I hate C)
    – BCS
    Aug 27, 2009 at 6:16
0

There is no semicolon after the enum.

0

no semi colon at the end of enum

0

The enum needs an ; after its }

Not the answer you're looking for? Browse other questions tagged or ask your own question.