i need help on this question. any kind souls can help me? with great thanks.

ive already done some part of it but still cant get it working

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

class  court
{
protected:
	string name, ic, telephone, fn, day;
	int time;
	
public:
	court(){};
	court(int time, string name, string ic, string telephone, string fn, string day);
	
	void getinfo (void);
	void display (void)
	{
		cout<<"Court : "<<fn<<endl;
		cout<<"Day : "<<day<<endl;
		cout<<"Time : "<<time<<endl;
		cout<<"Name : "<<name<<endl;
		cout<<"NIRC : "<<ic<<endl;
		cout<<"Telephone : "<<telephone<<endl;
	}
};
void court::getinfo()
{
	cout<<"Please choose the court, B1 or B2 : ";
	cin>>fn;
	cout<<"Please enter the day : ";
    cin>>day;
	cout<<"Available time : 10am, 12pm , 2pm , 4pm , 6pm , 8 pm , 10pm "<<endl;
	cout<<"Please choose the time : ";
	cin>>time;
	cout<<"Please enter the Name : ";
	cin>>name;
	cout<<"Please enter yout NIRC : ";
	cin>>ic;
	cout<<"Please enter your Hp number : ";
	cin>>telephone;
};

void main()
{
	court record;
	record.getinfo();
	int i;
	
	cout<<"Your record :"<<endl;
	record.display();
	cin>>i;
};

with much thanks

Member Avatar for iamthwee

Ask specific questions.

Yes, use code tags, post specific question and errors if there are any, your not going to get much help unless you do. :icon_neutral:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.