I'm using the following code in my program to exit, save, and stop/start but i get an error saying "Transfer of control bypasses initialization of." Why is it doing that and how can i fix it?
i'm about to do my assingment for switch case..
and i have to explain about switch case diz friday..
but i don't know anything about switch case..
how to make a program and how to use it..
help me plz..
int main()
{
int options;
cout << "Please select 1 of the following options to continue" << endl:
cout << "1. Do this function" << endl;
cout << "2. do this function" << endl;
etc.....
cin >> option;
switch ( option )
{
case 1: dothis code;
break;
case 2: dothis code;
etc....
}
return 0;
}
also check out the tutorials section.. probly more helpful.