-1
剛纔我被編碼的一些東西......一切都很順利,直到編譯器給了我這個錯誤:「vtable for * Class *」錯誤的含義是什麼?
C:\Users\presgiovanni\workspace\verbaleesami\Debug/../persona.h:24: riferimento non definito a "vtable for Persona"
main.o: nella funzione "ZN7PersonaD2Ev":
C:\Users\presgiovanni\workspace\verbaleesami\Debug/../persona.h:25: riferimento non definito a "vtable for Persona"
collect2.exe: error: ld returned 1 exit status
(我很抱歉,但它是在意大利,你知道...它說「未定義參考VTABLE的假面「)
這是有意的頭文件的代碼(線與表示‘>>’):
#ifndef PERSONA_H_
#define PERSONA_H_
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
using std::ostream;
using std::istream;
#include <string>
using std::string;
class Persona{
public:
>> Persona(){;}
>> virtual ~Persona() = default;
virtual bool login(istream&);
virtual ostream& print(ostream&);
protected:
string nome, cognome, nickname, password;
};
#endif /* PERSONA_H_ */
有人可以解釋我發生了什麼(我的工作與Eclipse)?謝謝!
你是男人!我忘了,因爲這個班對我來說應該是一個抽象的班級,以便讓你所說的成員函數初步化。只是一個愚蠢的缺乏!謝謝! – presgiovanni