Doing a project for an intermediate C++ class in Qt and I've run into a little problem that I can't figure out. I'm sure the solution is simple but my head doesn't want to cooperate.
We had to create three classes (employer, person, and position) then use them in main to make a simple hiring program. We had to follow a UML guide so I can't really change the function signatures.
I got rid of most errors but the last ones I have are with the hire function in the employer class.
c2027: use of undefined type 'Person'
c2228: left of '.setPosition' must have class/struct/union
1 2 3 4 5 6
bool Employer::hire(Person& newHire, Position pos)
{
Employer company = Employer(m_Name, m_market);
newHire.setPosition(company, pos);
return 1;
}
I'm not sure what it wants from me.
setPosition isn't a complicated thing either.