Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

When using enum - C2059 syntax error : 'constant' occur

739 views
Skip to first unread message

Pacs

unread,
Jun 3, 2003, 8:26:51 AM6/3/03
to
Hi
I am trying to build a .c application using Visual
Studio .NET compiler on WIN2K machine.
The compiler is building a .c application and it tries
to include cpic.h header file. Where it finds the
following enum typedef and reports an error C2059 syntax
error : 'constant'.

typedef enum {
MY_NUM = 0,
MY_NUM1 = 1,
MY_NUM2 = 2
} NUMS;

Any clue ? Your help is very much appreciated.
Thanks
Pacs

Gregg Miskelly [MSFT]

unread,
Jun 4, 2003, 5:59:20 PM6/4/03
to
In the future, I might suggest that you try a newsgroup devoted to the C language, or at least Microsoft's C++ compiler. This newsgroup is for the discussion
of the Visual Studio.NET debugger.

That said, my guess is that you are reusing one of the symbols MY_NUM, MYNUM1, MY_NUM2 or NUMS for two different things.

Gregg

--------------------


--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

0 new messages