Moments ago i was coding some stuff... Everything went smoothly until the compiler gave me this error:
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
(I'm sorry, but it's in italian, you know... It says "undefined reference to vtable for Persona")
This is the code of the header file interested (the lines are indicated with ">>"):
#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_ */
Can someone explain me what happened (I'm working with Eclipse)? Thank you!