This is the relevant code, I'm trying to write a function to pick type of account and when I run this, it keeps running in a weird loop. Any solutions?
void AccType(){
wrongInput:;
int typCho;
printf("What type of account do you want to open?\nPress 1 for Current\n2 for savings\n3 for retirement:\n");
scanf("%d",typCho);
switch (typCho) {
case 1:
strcpy(PracRec.AccTyp,"Current");
break;
case 2:
strcpy(PracRec.AccTyp,"Savings");
break;
case 3:
strcpy(PracRec.AccTyp,"Retirement");
break;
default:
printf("Please enter a valid choice!!\n");
goto wrongInput;
}
}