evo6master
2008-12-13 14:35:43 UTC
Ex.
void A();
void B();
void A()
{
char choice;
Hero A;
////////////////
A.hName ="A";
A.health =150;
A.defence =300;
A.attack =50;
////////////////
Hero B;
////////////////
B.hName ="B";
B.health =225;
B.defence =250;
B.attack =25;
////////////////
Hero C;
////////////////
C.hName ="C";
C.health =300;
C.defence =125;
C.attack =75;
////////////////
cout<<"make a choice between A, B, or C:";
cin>>choice:
switch(choice)
{
case 'A':
cout<<"Name: "<
case 'B':
cout<<"Name: "<
case 'C':
cout<<"Name: "<
default:
cout<<"Quit stalling, make a choice it's not hard A, B, or C:\n\n";
cSelection();
}
}
so now i want to use the choice that was used in void A(), in void B(); or use that choice in a new switch case to provide new information.
void B()
{
switch(choice)
{
case 'A':
cout<<"Name: "<
case 'B':
cout<<"Name: "<
case 'C':
cout<<"Name: "<
default:
cout<<"Quit stalling, make a choice it's not hard A, B, or C:\n\n";
B();
}
cout<
So can some one help me figure this out by example?