Recommended Posts

OK. I have a strange problem, well, its really a question.
I Have an abstract class(this means, some virtual routines).
Ok. Just tell me if this is posible to do and if i am doing it the correct way.
This base abstract class is the main interface for a multi-API implementation.
What i try to do is to derive(or how is it say?) a class from the abstract one, which will implement then be implemented with an specific API. This is the idea, but don't know how to do it. Something i got is this:
class base {
protected:
int data;
public:
virtual void routine(void)=0;
};
class dx_base {
void routine(void){data=123;};
};
This is more or less the structure i have. The goal here is the with some preprocesor instructions i can decide which derived class to use(dx, ogl, sdl, allegro, etc);