ok, i was almost positive that there was nothing wrong with this code and everything, but when i compile it i get a lot of errors that i know are wrong. does anybody know if there are some stupid mistakes im overlooking or anything?
Code:#include<iostream.h> class Shipping { public: double rate; char code; }; void main() { int x; char method Shipping info; char info[3].code = {'a', 't', 'r', 'h'}; double info[3].rate={14.95, 10.25, 8.75, 25.99}; cout<<"Please enter a shipping method code: "; cin>>method; for(x=0; x<4; ++x) { if( method==info[x].code) cout<<"The rate for your shipping method is $"<<info[x].rate; if(x=4) cout<<"You have entered an incorrect shipping method"; } }
thanks ahead of time for any help given.



LinkBack URL
About LinkBacks



on line 3 of the main() function.