that helped a little, but now i have a bug in the calculator itself.
basically, it takes both inputs in but doesn't return an output.
rather, it waits for another input, and then it asks for the repeat, and the input for the repeat does nothing.
This code declares the function, doesn't actually call it: double Subtraction(double dFirst, double dSecond);
You must put this code where you want to declare the functions.
You call the functins with parameters dFirst and dSecond but you dont use those variables... You use other not defined in the function (except they are global).
To call a function (ex Addition) you should use double result = Addition(dOne, dTwo);
with that you declare a new variable double type named result that has as a value the return of the function Addition.(You should put return statements in the functions, except it is declared s void)
at the end i ask the user if he needs any help in the form of a cout statement.
then i ask for his input and the do part runs while the variable is equal to y
however, when i run the program, it goes backwards and ends.
here's the code:
1 2 3 4 5 6 7 8 9 10 11 12
int main()
{
do{...
cout << "/nDo you need more help?"
cin >> cRepeat;
}
while (cRepeat == 'y');
return 0;
}
thanks, but i managed to fix the problem a little bit
now instead of asking if you need more help automatically, it just waits for you to input something, and then it asks if you need help. after that, if you input y, it will repeat, and if you input anything else, it will quit.
thanks for the suggestion though.
i tried your code but it didn't change the situation.