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

What does "expected unqualified-id before numeric constant" mean?

75 views
Skip to first unread message

Allen

unread,
Dec 24, 2007, 11:11:48 PM12/24/07
to
In my app, there is a namespace definition.

...
namespace CMD {
...
const int YT_UP = 1; // line 149
...
};

g++ tells expected unqualified-id before numeric constant error at
line 149.
I change it to be

namespace CMD {
...
const int YT_UP1 = 1; // line 149
...
};

It compiles ok.

So is there name collision for YT_UP?

Bo Persson

unread,
Dec 25, 2007, 6:10:10 AM12/25/07
to
Allen wrote:
:: In my app, there is a namespace definition.

Probably.

All uppercase names are often used for preprocessor macros, which
doesn't respect namespace scopes. Therefore such names should
generally be avoided for everything else.

Bo Persson


0 new messages