Doing that reinterprets an object of one type as being of another type via pointers, and isn't what you want here. What you're probably thinking of is a pointer to void, but that is not type safe, and anyway that isn't going to work with a shared_ptr. (You could get a pointer that could be converted to void* from a shared_ptr, but once the shared_ptr goes out of scope, that pointer to void becomes invalid.)Originally Posted by serge
Even if you switched from a shared_ptr so as to use a pointer to void, you have other problems: you could pass the pointer to void to PrintPlayer, but PrintPlayer would have no clue as to what is the underlying type, so you would need some way to specify it, and you'll be hardcoding PrintPlayer (and every other "generic" Player function) for each possible subclass of Player, whereas if you used polymorphism, you could add new Player subclasses without having to update PrintPlayer.
Why are you trying so hard to avoid better design?