Hi! I'm meant to be writing a program that will compute the cost of a car and a body modification package plus a sales tax, as of right now devC++ is only giving me one error stating that the package variable was not declared, I can't figure out why that's the only compiler error it's giving me, any help is appreciated
it says that the error is coming from line 19, the variable 'package' is what's not declared.
I assumed that using "OptionPackageCodeArray[] +=package;" would declare it though.
as dumb as I sound I'm completely lost on how to get this program to work, I only need the loop function to bounce out incorrect package code's.
Also I need to declare the package variable so that I can put it into the algorithm to output the total cost at the end which, it needs to be a string.
anyways..what are package supposed to be ??
you asked the user to input some PackageCode (which is string) but for the error checking you check it with int..
26 27
if (package < 0 || package >5 ) //if package is a string, this wont compile unless package is some sort of int stuff
cout<< "That is not a valid option" <<endl;