A class design question for an interview.

Is there any problem regarding the following design?
1
2
3
4
5
6
7
8
9
10
11
12
class A{
public: virtual void foo(){}
virtual void foo_00(){}
virtual void foo_01(){}
.
.
virtual void foo_100(){}
};
class B:public A{
public:
void foo(){}
};
Last edited on
It is syntactically correct.

The only "problem" I see is that you probably want a virtual destructor in A.
Topic archived. No new replies allowed.