ID Number: Q71767
5.10 6.00 6.00a 6.00ax 7.00 | 5.10 6.00 6.00a
MS-DOS | OS/2
Summary:
When compiling a program with Microsoft C or QuickC, the following
error may be generated if an integer constant is recognized
syntactically as being in an illegal location:
error C2059: syntax error: 'int constant'
The Microsoft C 7.0 version generates the following error message:
C2143: syntax error: missing ';' before 'constant'
Depending on the code, this error may result from a failure to include
a line continuation character in a multiline #define or macro
definition statement, or from placing an integer constant on a line by
itself.
More Information:
The sample code below demonstrates how this particular error might be
generated. The #define statement spans two lines, but the line
continuation character (a backslash) was inadvertently omitted from
the end of the first line. This causes the compiler to "see" the
integer constants as being on a line by themselves without any
contextual meaning, thus the C2059 error is generated.
Sample Code
-----------
/* Compile options needed: none
*/
#define coordinates {
16,16 }
void main(void)
{
/* .
.
CODE HERE
.
.
*/
}
Additional reference words: 6.00 6.00a 6.00ax 7.00