|
From: Luigi S. <gi...@li...> - 2003-02-13 16:22:56
|
On Thu, Feb 13, 2003 at 08:43:34AM +0100, Jaap de Wolff wrote:
> Yes, the code you show here has correct syntax.
> I expect that somewhere in your include files there is a
> #define small char.
Why would one need such a line, I've tried the following short
C program and it works.
enum_ex.c
---------
#include <stdio.h>
int
main()
{
enum Size { SMALL, MEDIUM, LARGE, GIANT };
puts("values used in the enumeration");
printf("SMALL = %d\n", SMALL);
printf("MEDIUM = %d\n", MEDIUM);
printf("LARGE = %d\n", LARGE);
printf("GIANT = %d\n", GIANT);
return 0;
}
> Just replace small by GranoBlasticSmall, and look what is happening..
> [...]
>
> -----Original Message-----
> From: Granoblastic Man [mailto:gr...@ta...]
>
> When trying to compile my code, I get a long list of errors, but they can
> all be traced back to one single error:
> "36 C:\CYGWIN\HOME\Granoblastic Man\Triad\ITEM.h
> parse error before `char'"
>
> 34 enum size
> 35 {
> 36 small,
> 37 medium,
> 38 large,
> 39 giant
> 40 };
>
> [...]
--
>> gisan >>
Give him an evasive answer.
|