need help with game inC programming for the Absolute beginner
The game is at the end of chapter 5 and it is the Trivia Game. I am using Dev-C++ and I have a problem. When I put in all the code I get an error message at the end of this code.
Code:
#include <stdio.h>
int sportsQuestion(void);
int geographyQuestion(void);
void pause(int);
int giResponse = 0;
main()
{
do {
system("clear");
printf("\n\tTHE TRIVIA GAME\n\n");
printf("1\tSports\n");
printf("2\tGeography\n");
printf("3\tQuit\n");
printf("\n\nEnter your selection: ");
scanf("%d", &giResponse);
switch(giResponse) {
case 1:
if (sportsQuestion()==4)
printf("\nCorrect!\n");
else
printf("\nIncorrect\n");
pause(2);
break;
case 2:
if (geograhpyQuestion()==2)
printf("\nCorrect!\n");
else
printf("\nIncorrect\n");
pause(2);
break;
}
}
}
right at the end I get an error message that says "Syntax error before '}' token. Can anyone please help me and tell me what this error code is for? :)