Someone please correct me in this attached code. I have also attached the error message Visual studio is throwing

Hello i am student writing a disturbing project. Kindly identify the errors in this code and advise me. I want the program to receive rent by a government institution and keep a register of this transactions and to return the status of payment (i.e. whether cleared or withstanding) which will be read by another class object to check the status.

#include <iostream>
#include <fstream>
#include <string>
using namespace std;




class National_Lands_Commission
{




public:

int land_rent;
int land_rent_received;
int land_rent_balance;
string land_rent_status; //should have two values i.e. either cleared or withstanding



National_Lands_Commission ();
int set_land_rent (const int*);




int get_Land_rent ()
{
return land_rent;

}

string get_land_rent_status () const
{
return land_rent_status;
}
};

int National_Lands_Commission:: set_land_rent (const int *money)


{
//using getter and setter method to set actual amount payable

return land_rent;
}



class County_Treasury: public National_Lands_Commission

{


public:


int calculateRent ();

string receive_Lessee_Rent ();

};
int County_Treasury:: calculateRent ()
{
land_rent_balance = land_rent - land_rent_received;
return land_rent_balance;
}


string County_Treasury :: receive_Lessee_Rent ()

{

fstream rent_receiver;
rent_receiver.open ("LandRent_register.txt", ios::in | ios::out);
if (rent_receiver.is_open ())

cout<<"Enter amount of Land rent received:"<<land_rent_received;
cin>>land_rent_received;
rent_receiver<<"land_rent_received"<<land_rent_received;


if (land_rent_received == land_rent)
cout<<"Land rent has been cleared in full";
return land_rent_status ="Cleared"; rent_receiver<<"land_rent_status:"<<land_rent_status;

if (land_rent_received > land_rent)
cout<<"Land rent has been cleared in full. Please collect your change of ksh."<<land_rent_received - land_rent;
rent_receiver<<"land_rent_received"<<land_rent_received<<"collect change of ksh."<<land_rent_received - land_rent;
return land_rent_status ="Cleared";

rent_receiver<<"land_rent_status:"<<land_rent_status;

if (land_rent_received < land_rent)
cout<<"Land rent is in arrears of:"<<land_rent_balance;
rent_receiver<<"land_rent_received"<<land_rent_received;

return land_rent_status ="Withstanding";

rent_receiver<<"land_rent_status:"<<land_rent_status;
} //in respect of land to be leased


int main ()
{

int land_rent;
cout<<"Please set the amount the fixed amount of Land rent payable"<<endl;
cin>>land_rent;

County_Treasury checker;
National_Lands_Commission *ptrCheker_status;

ptrCheker_status= &checker;
ptrCheker_status->get_land_rent_status ();

National_Lands_Commission setter;
setter.set_land_rent (&land_rent);


County_Treasury check_rent;
check_rent.get_Land_rent();


system ("pause");

return 0;
}



The error message am receiving


1>------ Build started: Project: problem, Configuration: Debug Win32 ------
1>Linking...
1>Bother.obj : error LNK2028: unresolved token (0A000365) "public: __thiscall National_Lands_Commission::National_Lands_Commission(void)" (??0National_Lands_Commission@@$$FQAE@XZ) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
1>Bother.obj : error LNK2019: unresolved external symbol "public: __thiscall National_Lands_Commission::National_Lands_Commission(void)" (??0National_Lands_Commission@@$$FQAE@XZ) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
1>C:\Users\dell\Desktop\Softwares\problem\Debug\problem.exe : fatal error LNK1120: 2 unresolved externals
1>Build log was saved at "file://c:\Users\dell\Desktop\Softwares\problem\problem\Debug\BuildLog.htm"
1>problem - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
You promise to define: National_Lands_Commission ();... but you don't.
Thanks cire.

Your peer eye did it ! I thought i was making a default constructor by including the statement !

Topic archived. No new replies allowed.