Created
December 23, 2012 12:11
-
-
Save Antol/4363117 to your computer and use it in GitHub Desktop.
Cool technique in C++ for superclasses
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 Object : public Node | |
{ | |
private: | |
// It helps to typedef super & self so if you change the name | |
// of the class or super class, you don't have to replace all | |
// the references | |
typedef Node super; | |
typedef Object self; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment