Is there any way to print the name of a derive class with a typeid trick,
because I can only manage to write the root class of a root class pointer?
So it will output "class Base", but I would like to receive "class Derivate"...
I'm sure that there's a way, as derived instances are able to get to the good
class's piece of code when you use virtual methods...
Code:class Base {}; class Derivate : public Base {}; //main() Base *Ptr = new Derivate; std::cout << typeid(Ptr).name();