Question: I am working on a c++ calculator program. I have to pass an enumerator and two numbers to a function but i cant figure out

I am working on a c++ calculator program. I have to pass an enumerator and two numbers to a function but i cant figure out why I am not able to pass my enumerator to the function

this is what I have so far

I am working on a c++ calculator program. I have to pass

NEVER MIND I HAD A BRAIN FART. I FIGURED OUT WHAT I DID WRONG!!

10 11 using namespace std; enum class Operations { add, subtract, multiply, divide }; 12 13 14 15 16 17 18 Bint main() { double numl; double num2; char oper; Operations op; cout > num1 >> oper >> num2; if (oper '+) { op = Operations::add; 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 else if (oper = '-') { op = Operations::subtract; else if (oper op = Operations::multiply; else if (oper = '/') { op = Operations::divide; }; while (numl && num2 != 0) { calculate (Operations op, double numl, double num2); } - HP CA a double calculate (Operations op, double numl, double num2) {

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!