In my programming class I work with Visual C++ and I made a program that compiles and runs perfectly on visual C++, but on Dev C++ it doens't recognise things like: left, fixed, right, showpoint. IT sees them as undeclared identifyers and stuff. I e-mailed the guys and they said that not only are those not ANSII standard, but they odn't know what they are used for. Now I got another program similar to this one that is due tomorrow, but I won't be able to test it with DevC++, so that is why I am worried.
Code:#include <iostream> #include <fstream> #include <iomanip> using namespace std; const float propTaxCal = 0.92; const float taxRate = 1.05; int main() { double assessedVal, taxAmount, propertyTax; ofstream outFile; outFile.open("a:ch3_Ex4out.txt"); cout << "This Program will help you Calculate property tax\n\n"; cout << "Enter the Assesed value of the Property: \n"; cin >> assessedVal; cout << "Calculating values to output file on Drive A"; outFile << fixed <<showpoint << setprecision(2); taxAmount = assessedVal * propTaxCal; outFile <<left <<"Assesse Value:" <<setw(34) <<setfill('.') <<right <<assessedVal << endl; outFile <<left <<"TaxAmount:"<<setw(38) <<setfill('.') <<right <<taxAmount << endl; outFile <<left <<"Tax Rate for each $100.00:"<<setw(22) <<setfill('.') <<right <<"1.05" << endl; propertyTax = (taxAmount / 100) * taxRate; outFile <<left <<"Property Tax: " <<setw(34) <<setfill('.') <<right << propertyTax <<endl; return 0; }



LinkBack URL
About LinkBacks



I need to know what to do because I am almost done with this other prog and won't be able to test it unless I find out how. Sorry for bumping, but I just don't want to be messed up for my class.