Hi welcome to TSG!
The primary problem is where you are placing the return 0 in the main() function. You have it placed inside the while { } statement. So the program will always exit without looping.
Good job on how you catch the divide by zero condition... you may want to consider using a switch statement instead of the if and else conditionals. Here is a code snippet that may get you thinking about making your code a bit more bullet proof, it uses another loop type and could be useful to you.
Code:
void menu()
{
bool valid;
do
{
cout<<"\nOperations are as follows...\n"
<<"'*' Multiplication\n"
<<"'/' Division\n"
<<"'-' Subtraction\n"
<<"'+' Addition\n"
<<"Press '!' to exit\n"
<<"Please Enter An Operation:";
cin >> op;
cout << "\n";
switch (op)
{
case '*':
case '/':
case '-':
case '+':
case '!':
{
valid = true;
break;
}
default:
{
valid = false;
cout << "\nInvalid Operation!\n";
}
}
}
while (!valid);
}
Keep at it.
Best,
Dan