The error of "} expected" appears at line 5.
Why is that? I have included it at line 12.
The error of "Declaration missing ;" appears at line 8.
Why? There is ";" at the end of the line.
class PEmployee
{
public:
PEmployee();
PEmployee(string employee_name, double initial_salary);
void set_salary(double new_salary);
double get_salary() const;
string get_name() const;
private:
Person person_data;
double salary;
};
int main()
{
PEmployee f("Patrick", 1000.00);
cout << f.get_name() << " earns a salary of "
<< f.get_salary() << endl;
return 0;
}