Guest Posted July 7, 2008 Share Posted July 7, 2008 I decided to just fuck vb6 and gm6.1a and decide to move on to C++ seeing as how paying careers are more likely to happen with that language (and I don't give a damn if you have something to try and prove against me like "BUT VB IS THE MOST USED LANGUAGE EVARZZ!111!!! renzo joke"). Anyways, I am having errors with a simple tax calculator that I am making to try and get how this language works (it isn't so bad, if I knew wtf a non-lvalue was):```#include using namespace std;int main(){//variablesint item_cost;int tax_rate;int result;int tax;cout<<"Tax Calculator \n";cout<<"How much does your item cost:";cin>> item_cost;cin.ignore();cout<<"\n";cout<<"What is your area's tax rate:";cin>> tax_rate;cin.ignore();cout<<"\n";cout<<"Calculating... \n";if (tax_rate > 0) { return tax_rate = tax_rate/100; return item_cost * tax_rate = tax; return item_cost + tax = result; //line 26 } //line 27else { return item_cost = result; return tax_rate = 0; }cout<<"Report: \n";cout<<"Item Cost: "< Oh yeah, I use Dev-C++ and standard ANSI/ISO C++. The compiler reports non-lvalue in assignment on lines 26 and 27 (which I commented to help you find).``` Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now