Skip to content

Instantly share code, notes, and snippets.

@zainulabidin302
Created July 20, 2016 21:26
Show Gist options
  • Save zainulabidin302/1b4076227a4412693e1cf2eb90610d52 to your computer and use it in GitHub Desktop.
Save zainulabidin302/1b4076227a4412693e1cf2eb90610d52 to your computer and use it in GitHub Desktop.
Abstract Class Example
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