parse error before numeric constant HELPPP
Hey,
I really need help I got this project due tomorrow, and I cant get this stupid thing to compile. Im using xemacs and here is the code:
void ConvertTime (void)
{
printf("Where are you ?\n");
/* Display the five possible foreign locations that the
user may choose from. */
DisplayLocations ();
printf("Your choice :\n");
/* Allow the user to choose one of the five possible
foreign locations from the location menu. */
int locationMenuChoice = GetValidInt
(LONDON, STPETERSBURG);
printf("What time is it ?\n");
printf("hour:\n");
/* Allow the user to choose an hour between MINHOUR, 0,
and MAXHOUR, 23. */
int foreignHour = GetValidInt (MINHOUR, MAXHOUR);
printf("minutes:\n");
/* Allow the user to choose a minute between MINMINUTE,
0, and MAXMINUTE, 59. */
int foreignMinute = GetValidInt (MINMINUTE, MAXMINUTE);
int easternHour;
/* Converts the foreign hour, in 24-hour form, into the
correct Eastern hour, in 24-hour form, and displays
the foreign time in the city selected by the user. */
switch(locationMenuChoice)
{
Case LONDON:
easternHour = ForeignTimeToEastern (foreignHour, LONDONTIME);
printf("%d:%d London time is ", foreignHour, foreignMinute);
break;
Case STOCKHOLM:
easternHour = ForeignTimeToEastern (foreignHour, STOCKHOLMTIME);
printf("%d:%d Stockholm time is ", foreignHour, foreignMinute);
break;
Case TAMPERE:
easternHour = ForeignTimeToEastern (foreignHour, TAMPERETIME);
printf("%d:%d Tampere time is ", foreignHour, foreignMinute);
break;
Case HELSINKI:
easternHour = ForeignTimeToEastern (foreignHour, HELSINKITIME);
printf("%d:%d Helsinki time is ", foreignHour, foreignMinute);
break;
Case STPETERSBURG:
easternHour = ForeignTimeToEastern (foreignHour, STPETERSBURGTIME);
printf("%d:%d St. Petersburg time is ", foreignHour, foreignMinute);
break;
}
/* Converts the Eastern hour into 12-hour form with AM
or PM and displays the Eastern time in 12-hour
form. */
PrintInUSForm (easternHour, foreignMinute);
}
Its giving me the following compiler error:
travel.c: In function `ConvertTime':
travel.c:445: error: `Case' undeclared (first use in this function)
travel.c:445: error: (Each undeclared identifier is reported only once
travel.c:445: error: for each function it appears in.)
travel.c:445: error: parse error before numeric constant
travel.c:450: error: parse error before numeric constant
travel.c:455: error: parse error before numeric constant
travel.c:460: error: parse error before numeric constant
travel.c:465: error: parse error before numeric constant
How do I get this fixed??
Thanks a lot,
Mistro116
|