This code is designed to let users create their own estimates for pricing and for some reason, the grandTotal function doesn't work right, any thoughts??
In what way does it not work? What are the values of hoursTotal, virusTotal, pCleanTotal, oSTotal, dataBackupTotal, dataBackupMDTotal, softwareInstallTotal, sHoursTotal and hHoursTotal at the point where grandTotal is calculated?
they are supposed to be whatever the user ends up determining, if the cin of pClean is yes the PCleanTotal becomes 10 but if the user enters anything else it should be 0 and at the end it should add everything up, right now it always gives me -2 no matter what i do.
Why don't you make a function that checks whether a std:string
is equal to yes - in whatever combination/case the letters occur.
It would be neater than having all those
checks like