Please help, internal compiler error
I am made a program to convert american money to canadian but I wanted to play around with it and use a switch statement so that you can go from american to canadian and visa versa, anyways this is my code:
Code:
#include <stdio.h>
int choice;
float userNum=0;
double userNumA=0;
#define US 1.57551;
#define CAN 1;
int main(void)
{
while(1)
{
printf("This converter will either convert Canadian money to US, or visa versa.\n");
printf("When you want to quit simply enter any number that has a value less than 1.\n");
printf("1. American to Canadian \n2. Canadian to American.");
scanf("%d", &choice);
switch(int)
{
case '1':
printf("Please enter the American amount now: ");
scanf("%f",userNum);
if(userNum>=1)
{
userNumA =userNum * US;
printf("\nAmerican amount:%f -- Canadian amount: %f\n\n",userNum, userNumA);
}
else
{
break;
}
case '2':
printf("Please enter the Canadian amount now: ");
scanf("%f",userNum);
if(userNum>=1)
{
userNumA = userNum / US;
printf("\nCanadian amount:%f -- American amount: %f\n\n",userNum, userNumA);
}
else
{
break;
}
default:
printf("Please enter either 1 or 2.");
}
printf("\nThank you for using my converter\n\n");
return 0;
}
}
Here is the error:
fatal error C1001: INTERNAL COMPILER ERROR
It started when I changed the divide symbol from \ to / because otherwise I get an error about an empty carrige or something, can someone help or at least explain what an internal error is and what causes it?? thanks a lot.