Quote:
Originally Posted by @$3.1415rin
dynamic cast would cast it, yes, but I want the name of it.
I could of course create a virtual function returning the name, or a member variable being updated. that could of course be optimized by some preprocessor stuff to have less to write. but that's all stuff i'd call too much effort 
|
Well...with dynamic_cast you can see if class X is from type Y. If its not it will return NULL.
Although I'm not sure if it will work on base classes...
I think the best way is(like sfx1999 said) to make a way to 'identify' each class, since dynamic_cast isn't very efficient I believe.