我不知何故得到了这个错误。这是我的代码:
#ifndef BASESTATION_H_
#define BASESTATION_H_
#include <list>
#include "Song.h"
#include <string>
using mtm::Song;
using std::list;
namespace stations {
class baseStation {
public:
explicit baseStation(double frequency) : frequency(frequency) {}
double getFrequency() const;
bool getIsFullVersion() const;
bool isInPlaylist(const string& author, const string& name) const;
virtual void addSong(const Song& song);
virtual const Song& getCurrentSong() const;
virtual const SongPart& getCurrentlyPlayedPart(unsigned int time) const;
virtual ~baseStation();
private:
//keep it protected or not??
double frequency;
list<Song> playlist;
list<Song>::iterator currentSong;
bool isFullVersion;
};
我得到的错误是:在“显式”行上未定义对“vtable forstations::baseStation”的引用。
非常感谢。`