I have simple else if and have errors on the word syntax – for.
Please help me to fix this
Error 4 error C2143: syntax error : missing ';' before 'type'
Error 7 error C2143: syntax error : missing ';' before '{'
Error 3 error C2143: syntax error : missing ')' before 'type'
Error 6 error C2059: syntax error : ')'
My code is checking which array is bigger and puts the bigger.
Thats my all fnction:
void PrintIdentical(...)
{
int i;
int smaller;
...
for (i = 0; i < smaller; i++)
{
printf ("%d", arrA[i]);
printf ("%d", arrB[i]);
}
}
This syntax is C99, it is not allowed in previous standards. Since you’ve already declared
i, you can just change that to:If you want a block-level
iin there anyway (it will shadow theithat you defined earlier in your function), then use:or get a compiler that supports C99.