Error - Expected identifier or '('


Good evening,
I’m doing the recursion activity, about the annoying Beer Song. I have typed in the code from the book correctly (as far as I can tell), but i keep getting an error on the 4th to last line saying “expected identifier or ‘(’” on the ‘{’. WHy is this? It is correctly matched up with another bracket.

#include <stdio.h>
void singTheSong(int numberOfBottles)
if (numberOfBottles == 0) {
printf(“There are simply no more bottles of beer on the wall.\n”);
} else {
printf("%d bottles off beer on the wall. %d bottles of beer.\n",
numberOfBottles, numberOfBottles);
int oneFewer = numberOfBottles - 1;
printf(“Take on down, pass it around, %d bottles of beer on the wall.\n”,
singTheSong(oneFewer); //This function calls itself
printf(“Put a bottle in the recycling, %d empty bottles in the bin.\n”,

int main(int argc, const char * argv[]);
return 0;


Get rid of the semicolon after the definition of the main method. That should only be there when declaring a method or function, not when defining it.


Thanks, bro, couldn’t find it haha