0
I have an example from the book Malik: C++ programing from problems analysis to program design, page 430, exercise 11.
2 odpowiedzi
+ 2
You are passing values in wrong matching, not according to requirement.. From the function sent values, 1st argument is copied to 1st argument in function defination, 2nd to 2nd,. 3rd to 3rd...
So in your code session is copied to discount.. Similarly other.
And costofMembership, discount,sessions are uninitialized values you are passing.. It may take garbage values if you use so it lead wrong result. Take inputs or set default values..
0
Если сидишь на Visual studio используй отладчик. Очень полезная штука, без неё ни куда.
If you are using Visual studio use the debugger.