次のエラーが表示されますが、その理由がわかりません。
Could not find a match for 'PEmployee::PEmployee(char *, double)' in function main()
これが私のコードです:
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;
}
このエラーが発生する理由を教えてもらえますか?
ありがとう。