Created
July 13, 2015 18:40
-
-
Save pradeepbn/9c2b2441556fcfa709ee 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 A | |
{ | |
public: | |
A(); | |
~A(); | |
virtual void Afoo(); | |
} | |
class A1 : public A | |
{ | |
public: | |
A1(); | |
~A1(); | |
virtual void Afoo(); | |
void A1foo(); | |
} | |
void foo(A *pa) | |
{ | |
A1 *pa1 = (A1 *)(pa); | |
pa1->A1foo(); | |
pa1->Afoo(); | |
delete pa1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment