Also, check this line:
double doDivideZero(double &)
You need to name your variable, such as (double& x)
cscgal
The Queen of DaniWeb
19,422 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 230
Forget about your doDivideZero function and replace some of your code with
case '/': cout << " Enter Number:";
cin >> newEntry;
if (newEntry == 0)
{
cout << "Wrong Operation, Cannot Divide by Zero" << endl;
newEntry = 1;
}
displayedVal = displayedVal / newEntry;
break;
This keeps the program going ...
vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
Talk about resurrecting the dead on Halloween.. never seen a post this old get bumped to the top in a long time (this thread originated back in 2004!)
Clinton Portis
Practically a Posting Shark
833 posts since Oct 2005
Reputation Points: 237
Solved Threads: 118
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
And yet another hijack bump to a 6 year old thread. I don't think he read even one thing he was asked to read upon registering, so why would he read the important stickys and announcements at the top of the forum itself?
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944