Jul 18, 2013 at 11:55am
you can have a default case. the break is optional in the end but i put it anyway.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
cin >> c;
switch(c)
{
case '1':
blacksmith();
town();
break;
case '2':
alchemist();
town();
break;
case '3':
forest();
town();
break;
case '4':
quest();
town();
break;
case '5':
stats();
town();
break;
default:
cout << "everything else that fails gets called here" << endl;
break;
}
|
Last edited on Jul 18, 2013 at 11:56am