I have a function declared in my base class and specified as virtual, I am trying to re-declare it in a derived class but I'm getting a multiple declaration error.
Anyone know if I'm missing something here?
class Field {
public:
virtual void display() = 0;
virtual int edit() = 0;
virtual bool editable() const = 0;
virtual void *data() = 0;
virtual Field *clone() const = 0;
};
class LField : public Field {
int rowNum;
int colNum;
int width;
char *val;
bool canEdit;
int index;
public:
virtual void *data() { return val; }
};
class IVField : public LField {
void (*ptrFunc)(void *);
bool (*ptrValid)(int &);
int *data;
public:
void* data() {
return data;
}
};
class DVField : public LField {
int decimalsToDisplay;
double *data;
void (*ptrFunc)(void *);
bool (*ptrValid)(double&);
public:
void* data() {
return data;
}
};