I am getting errors that say "no match for operator and things having to do with my_operation. Why am I getting errors for this? I am not sure why I added a boolean when it's not even correct.
#include <iostream>
using namespace std;
int main() {
enum Operation {Multiply = 'M', Add = 'A', Difference = 'D'};
int result;
int num1, num2;
Operation my_operation;
char choice;
bool = true;
cout<<"Enter two integers:"; cin>>num1>>num2;
do
{
cout<<"Choose from the list of operations:"<<endl;
cout<<"M / Multiply"<<endl;
cout<<"A / Add"<<endl;
cout<<"D / Difference"<<endl;
cin>>my_operation;
switch (my_operation){
case M:
result = num1 * num2;
break;
case A:
result = num1 + num2;
break;
case D:
result = num1 - num2;
break;
default:
cout<<"Try again. Please choose to Multiply, Add, or to find the Difference.";
break;
}
} while (true);
cout<<"The result of the operation is "<<result<<endl;
return 0;
}