...
Esimerkki 2. Moniperiytymisen ongelma.
CHevonen:
Code Block |
---|
class CHevonen { public: void Syo() { } }; |
CLintu:
Code Block |
---|
class CLintu { public: void Syo() { } }; |
CPegasus:
Code Block |
---|
class CPegasus : public CHevonen, public CLintu { }; |
main:
Code Block |
---|
int main() { CPegasus pegasus; pegasus.Syo(); } |
...