expected unqualified-id before numeric constant

  • Follow


Hi
what does this error msg mean? I don't understand what to change.
Many thanks
Michael

Multiple markers at this line
	- expected unqualified-id before numeric constant
	- Syntax error
----

within class:
  int       KeyPress(int cde);

------

Declaration in x.h:
#define KeyPress		2
0
Reply ahso47 (55) 11/27/2009 11:21:20 AM

"ahso" <ahso47@yahoo.com>

>  int       KeyPress(int cde);
> #define KeyPress 2

makes

int       2(int cde);

that looks like utter nonsense to a human, but the compiler matches some 
part of it to a valid syntax and pick some element that does not fit. 

0
Reply Balog 11/27/2009 11:51:50 AM


In message 
<13c32cde-6a2f-4a1b-9974-ff796e50dfdb@k19g2000yqc.googlegroups.com>, 
ahso <ahso47@yahoo.com> writes
>Hi
>what does this error msg mean? I don't understand what to change.
>Many thanks
>Michael
>
>Multiple markers at this line
>       - expected unqualified-id before numeric constant
>       - Syntax error
>----
>
>within class:
>  int       KeyPress(int cde);
>
>------
>
>Declaration in x.h:
>#define KeyPress               2

so the preprocesor expands your code to

int 2(int cde);

which is indeed a syntax error.

What on earth are you trying to do?

-- 
Richard Herring
1
Reply Richard 11/27/2009 12:27:11 PM

2 Replies
1716 Views

(page loaded in 0.048 seconds)

Similiar Articles:













7/21/2012 11:50:53 PM


Reply: