Неопределенная ссылка на vtable "Транзакция"

Я новичок в C++. У меня проблема с компиляцией кода.

AddEmployeeTransaction.h

extern PayrollDatabase GpayrollDatabase;

class AddEmployeeTransaction : public Transaction {
    public:
        virtual ~AddEmployeeTransaction();
        AddEmployeeTransaction(int empid, string name, string address);
        virtual PaymentClassification* GetClassification() const = 0;
        virtual PaymentSchedule* GetSchedule() const = 0;
        virtual void Execute();

    private:
        int itsEmpid;
        string itsName;
        string itsAddress;

};


#endif //PAYROLL_ADDEMPLOYEETRANSACTION_H

AddEmployeeTransaction.cpp

AddEmployeeTransaction::~AddEmployeeTransaction() {
}

AddEmployeeTransaction::
AddEmployeeTransaction(int empid, string name, string address)
        : itsEmpid(empid)
        , itsName(name)
        , itsAddress(address){}

PaymentClassification* AddEmployeeTransaction::GetClassification() const {}

PaymentSchedule* AddEmployeeTransaction::GetSchedule() const {}

void AddEmployeeTransaction::Execute() {
    PaymentClassification* pc = GetClassification();
    PaymentSchedule* ps = GetSchedule();
    PaymentMethod* pm = new HoldMethod();
    Employee* e = new Employee(itsEmpid, itsName, itsAddress);
    e->SetClassification(pc);
    e->SetSchedule(ps);
    e->SetMethod(pm);
    GpayrollDatabase.AddEmployee(itsEmpid, e);
}



#endif //PAYROLL_TRANSACTION_H

При компиляции я получил сообщение об ошибке:: неопределенная ссылка на `vtable for Transaction'

0 ответов

Другие вопросы по тегам