c++ - Vtable ran away -


class medicinerepository { public:     virtual medicine* findbyid(int medid) ;     virtual vector<medicine*> getall() ;     virtual int getnrmeds() ;     virtual void addmed(medicine s) ;     virtual void removemed(int medid) ;     virtual ~medicinerepository() ; }; 

undefined reference vtable medicinerepository' error in class.i'm inheriting class in module , looks in header:

class medrepo : public medicinerepository{ public: ~medrepo(); ... }; 

and in cpp it's defined :

medrepo::~medrepo() {} 

i don't understand , i've looked usefull in undefined reference vtable

i don't think you've posted enough of error output meaningfully determine problem - getting in every file includes header, or getting on specific line of code? in file? did implement body ~medicinerepository?

i suggest take copy of code, remove functionality implementations possible, strip down minimum set of definitions still generates error, , if doesn't solve it, post that.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -