dev/cpp/static_cast/static_cast.cpp

15 lines
118 B
C++
Raw Normal View History

2014-04-23 22:20:33 +04:00
class A {
public:
void f () {}
};
int main (void)
{
A a;
void *p = &a;
static_cast<A*>(p)->f();
return 0;
}