I'm creating a simple abstract class named Asset, the header code looks like this:
#ifndef ASSET_H
#define ASSET_H
#include <QString>
#include <QDate>
class Asset
{
public:
Asset(QString des, QDate dat);
~Asset();
virtual QString toString();
virtual double value();
QString getDescription();
private:
QString description;
protected:
QDate date;
};
#endif // ASSET_H
This is what my implementation file looks like:
#include "asset.h"
Asset::Asset(QString des, QDate dat)
{
description = des;
date = dat;
}
QString Asset::getDescription()
{
return description;
}
The error code I'm getting on the implementation constructor is: undefined reference to vtable for Asset
What am I doing wrong here?