Question: I have multiple errors in multiple files, so bare with me . In one of my class implementation files, I am getting an error that

I have multiple errors in multiple files, so bare with me. In one of my class implementation files, I am getting an error that this section of code:
void Match::assignteamCoach()
{
if (!teamCoach)
{
teamCoach = teamCoach;
}
else
{
std::cout << "A Coach has already been assigned." << std::endl;
}
}
has this error: no operator "!" matches these operands
this snippet:
if (m.teamCoach.empty())
{
output <<"No coach has been assigned.";
}
else
{
output << "Team Coach: ";
output << m.teamCoach << std::endl;
}
has this error: class Coach has no member "empty"
and in my main cpp file, this code snippet:
std::string teamName, matchLocation, matchOpponent;
int month, day, year;
char slash;
Date matchDate;
std::cout << "Team Name: ";
std::getline(std::cin, teamName);
std::cout << "Match Location: ";
std::getline(std::cin, matchLocation);
std::cout << "Match Opponent: ";
std::getline(std::cin, matchOpponent);
std::cout << "Match Date (mm/dd/yyyy): ";
std::cin >> month >> slash >> day >> slash >> year;
matchDate.setDate(month, day, year);
Match newMatch(teamName, matchLocation, matchOpponent, matchDate);
gives this error on the last line: no instance of constructor "Match::Match" matches the Inheritence argument list
Any help would be appreciated.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!