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*);
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";