This seems like the simplest code, but I don't know why it won't compile:
switch(choice) {
case 0:
printf("%d", LOOP_LIMIT); /* this line gives the error */
break;
case 1:
when I comment out the line it compiles fine
– Adjust the Curly Braces To Fix the Expected Unqualified Id Error. You should match the opening and closing curly braces in your code to ensure the right quantity of brackets. The code should not have an extra or a missing curly bracket.
Solution 2Adding a semicolon to a function definition turns it into a forward declaration - which can't have a body. Remove the semicolon at the end of the "main" line. int r = scanf("%d-%d-%d", &x, &y, &z); You will need to do the same thing with printf as well.
It literally means what it's saying. You're missing an important parenthesis there, bud. Check your code before you hit the semicolon.
It means the syntax is invalid.
Your code has something like this:
#define LOOP_LIMIT 10;
^
Remove this semicolon.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With