I'm working on a midterm project, its long, but my question is about a small portion of it.
I'm listing 3 options for auto-coverage;
1) semi-annual costing $3500
2) cover by collateralizing bod worth of $500,000 (which will list as cost $0)
3) Use the $500,000 to buy into a mutual fund with a return of 6% (will list as 6% of $500,000 of cost deduction towards annual expenses.
the coverage will be calculated based on which of these the user selects, but whatever I input for selection, the selection seems to always=0, I think my problem is with the function input(selection), but I dont see anything wrong with my function...Any help will be highly appreciated...thanks in advance...
input() takes an int, so it's unable to modify its actual parameter. It can only modify its formal parameter.
Either make input() take a reference, or make it return the value of the variable you stored the user's input in.
Thanks for your response helios. This is my first course in c++ and im not sure I understand what you mean by actual and formal parameters, reference for the input(), or how would I go about returning the value of the variable... if you find the time to further explain that to me, I'd appreciate it.