************** START OF THE CODE *********************
**************** END OF CODE ************************Code:#include<iostream> #include<fstream> using namespace std; ifstream fin("c:/files/data.txt"); class BankLoanApproval{ int records; double yr_income; double loan_amount; int term_of_loan; int cust_status; public: BankLoanApproval (int r, double y, double la, int t, int cs); int GetRecords() {return records;} double GetIncome() {return yr_income;} double GetLoanAmount() {return loan_amount;} int GetTerm() {return term_of_loan;} int GetStatus() {return cust_status;} int SetRecords(int n_records) { return records=n_records; } void SetIncome(double new_income) { yr_income=new_income; } void SetLoan(double new_amount) { loan_amount=new_amount; } void SetTerm(int term) { term_of_loan=term; } void SetStatus(int c_status) { cust_status=c_status; } }; BankLoanApproval::BankLoanApproval(int r, double y, double la, int t,int cs) { records = r; yr_income = y; loan_amount= la; term_of_loan = t; cust_status = cs; } void main() { if (!fin) { cout << " Can not Open the input file with customer data!!"<< endl; exit(1); } int count; int rec; double income; double amount; int term; int status; fin >> rec >> income >> amount >> term >> status; BankLoanApproval loan(rec, income, amount, term, status); count = loan.SetRecords(rec); cout << count << "\n"; fin.close(); for(count; count > 0 ; count--) { fin >> rec >> income; loan.SetIncome(income); cout << loan.SetIncome(); loan.SetLoan(amount); cout << loan.SetLoan(); loan.SetStatus(status); cout << loan.SetStatus(); loan.SetTerm(term(; cout << loan.SetTerm(); } }
this are the error by the compiler can't figure it why?
--------------------Configuration: assigment2 - Win32 Debug--------------------
Compiling...
BankLoan.cpp
C:\assigment2\BankLoan.cpp(76) : error C2660: 'SetIncome' : function does not take 0 parameters
C:\assigment2\BankLoan.cpp(78) : error C2660: 'SetLoan' : function does not take 0 parameters
C:\assigment2\BankLoan.cpp(80) : error C2660: 'SetStatus' : function does not take 0 parameters
C:\assigment2\BankLoan.cpp(82) : error C2660: 'SetTerm' : function does not take 0 parameters
Error executing cl.exe.
BankLoan.obj - 4 error(s), 0 warning(s)
----------------------------------------------------------------------------------
I am suppose to read the parameters from a file.
[code][/code]tagged by Salem