I need to subtract the trade in price from the new car price. I'm unsure of how to get it and where to enter it so I'm going to toss some of my code on here....I don't have any errors right now, just trying to get this subtraction to go through. Would also need to add a 5% commission on the value of new car.
Any help is much appreciated..........thank you in advance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// include statements
#include <cstdlib>
#include<string>
#include<iostream>
// display the new car information entered by the user
displayAutoA(myCar);
cout<<endl<<endl;
//display the trade in infrormation entered by the user
displayAutoB(tradeIn);
cout<<endl<<endl;
return 0;
} // end main
I might be missing somthing, but you never actually declare class "Automobile", and I'm not seeing a "Automobile.h" so.... Am I being stupid or whats happening?
Also whats up lines: 8,20,22,59 or did you just miss the "//" when you copied and pasted.
Anyways for the commision you just have a "add_commision_to_salary" function. So why don't you just use "cin" to get the trade in price and the new car price, or if you really want to get fancy you could overload an operator.
I apologize, I didn't realize I would need to post all of the code. I reposted all of my code. You are right, I did double up on some code, I wasn't sure how else to do it...........
Trying to struggle through self-teaching...........good times.