Hi, Iam writing a code for my class and I cant figure out how to solve it. I will be glad if somebody can teach me how to do something to correct it.
The program is divided it 3 parts.
The bold part if where Iam having trouble. I don't know exactly what I have to do to compile
Thanks ,
doug
The program is divided it 3 parts.
Code:
switch (symbol)
{
case '+':
read_frac(fraction* f);
print_frac(fraction& a_fraction);
answer = add(fraction f1, fraction f2);
nome = "sum";
break;
case '-':
read_frac(fraction* f);
print_frac(fraction& a_fraction);
answer = sub(fraction f1, fraction f2);
nome= "difference";
break;
case '*':
read_frac(fraction* f);
print_frac(fraction& a_fraction);
answer = mult(fraction f1, fraction f2);
break;
case 'x':
answer = mult(fraction f1, fraction f2);
nome = "product";
break;
case '/': read_frac(fraction* f);
print_frac(fraction& a_fraction);
answer = div(fraction f1, fraction f2);
nome = "quotient";
break;
}
cout << "The " << nome << " of " << << " and " << fraction << " is "<< answer << "\n";
Thanks ,
doug
Comment