blob: ebe9263bd13dbb3c06232452fba663079bddfeed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include <stdio.h>
struct Support {
virtual void f() {
printf("f()\n");
}
};
struct Derived : Support {
};
int main() {
Support * p = new Derived;
dynamic_cast<Derived*>(p)->f();
}
|