Created
July 20, 2016 21:26
-
-
Save zainulabidin302/1b4076227a4412693e1cf2eb90610d52 to your computer and use it in GitHub Desktop.
Abstract Class Example
This file contains hidden or 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 AbstractClassExample { | |
public: | |
virtual int dieHard()=0; | |
}; | |
class YetAnotherAbstractClassExample: public AbstractClassExample {}; | |
class FinallyConcreteClassExample: public AbstractClassExample { | |
public: | |
int dieHard() { | |
return 1 == 1.0; | |
}; | |
}; | |
int main () { | |
// AbstractClassExample ab; //Illegal | |
// YetAnotherAbstractClassExample taace; // Illegal | |
FinallyConcreteClassExample dce ; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment