B
Bint
Hello,
Is there something wrong with this class/subclass declaration that would
cause the error "Error : cannot construct prefboxtoggle's base class
'boxvaltoggle'"?
I don't see why it shouldn't work.
Thanks for any help!
B
class boxvaltoggle { public:
u8 *val;
int atx, aty, w, h;
void (*hitfunction)(void *);
boxvaltoggle(int ax, int ay, int ww, int hh, u8 *v) {
atx = ax;
aty = ay;
w = ww;
h = hh;
val = v;
}
};
class prefboxtoggleublic boxvaltoggle { public:
const char *title, *selection0, *selection1;
prefboxtoggle(int ax, int ay, int ww, int hh, const char * t, u8 *v,
const char *s1, const char *s2) {
boxvaltoggle(ax,ay,ww,hh,v);
title = t;
selection0 = s1;
selection1 = s2;
}
void Draw(Boolean lit);
u8 Do(u8 x, u8 y, u8 button);
};
Is there something wrong with this class/subclass declaration that would
cause the error "Error : cannot construct prefboxtoggle's base class
'boxvaltoggle'"?
I don't see why it shouldn't work.
Thanks for any help!
B
class boxvaltoggle { public:
u8 *val;
int atx, aty, w, h;
void (*hitfunction)(void *);
boxvaltoggle(int ax, int ay, int ww, int hh, u8 *v) {
atx = ax;
aty = ay;
w = ww;
h = hh;
val = v;
}
};
class prefboxtoggleublic boxvaltoggle { public:
const char *title, *selection0, *selection1;
prefboxtoggle(int ax, int ay, int ww, int hh, const char * t, u8 *v,
const char *s1, const char *s2) {
boxvaltoggle(ax,ay,ww,hh,v);
title = t;
selection0 = s1;
selection1 = s2;
}
void Draw(Boolean lit);
u8 Do(u8 x, u8 y, u8 button);
};