Created
January 1, 2019 22:25
-
-
Save cleak/83490f46ff38b0bc5518ccd9a51f5608 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
class GenericGreeter { | |
public: | |
virtual void Greet(const char* name) { | |
cout << "Hi " << name << "." << endl; | |
} | |
}; | |
class FriendlyGreeter : public GenericGreeter { | |
public: | |
virtual void Greet(const char* name) { | |
cout << "Hello " << name << "! It's a pleasure to meet you!" << endl; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment