Skip to content

Instantly share code, notes, and snippets.

@pradeepbn
Created July 13, 2015 18:40
Show Gist options
  • Save pradeepbn/9c2b2441556fcfa709ee to your computer and use it in GitHub Desktop.
Save pradeepbn/9c2b2441556fcfa709ee to your computer and use it in GitHub Desktop.
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