nikoniko-programming
Wednesday, September 23, 2009
Inheritance case study #2: Implementing interface inside a base class
class D1 {
public:
virtual void Test(int a) = 0;
};
class D4 {
public:
void Test(int d){
}
};
class D5 : public D1, public D4 {
public:
};
Inheritance case study #1: Inheriting an identical interface from two different classes
class D1 {
public:
virtual void Test(int a) = 0;
};
class D2 {
public:
virtual void Test(int b) = 0;
};
class D3 : public D1, public D2 {
public:
void Test(int c){
}
};
Newer Posts
Older Posts
Home