Created
November 13, 2013 01:55
-
-
Save oxUnd/7442262 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __cpp01__virtual__ | |
#define __cpp01__virtual__ | |
#include <iostream> | |
class Base { | |
public: | |
virtual int print(const char *) = 0; | |
~Base(); | |
}; | |
class ChildA : public Base { | |
public: | |
int print(const char *); | |
}; | |
class ChildB : public Base { | |
public: | |
int print(const char *); | |
}; | |
void print(Base *, const char *); | |
void virtual_go(); | |
#endif /* defined(__cpp01__virtual__) */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment