#include #include struct Basis { virtual ~Basis(){} }; struct Abgeleitet : Basis { void hallo() { std::cout << "Hallo\n"; } }; int main() { std::shared_ptr p = std::make_shared(); auto q = std::static_pointer_cast(p)) q->hallo(); }