I always wondered about something related. Assuming at some Point you Need to know what class an object actually is of. Then, as far as I understand, I could try dynamic_cast<> to all possible classes. And that's O(n), if n is the number of possible classes. So having a map or hashtable to just look it up should theoretically be faster for large enough n. Is this correct or am I missing a possible way to use dynamic_cast<> efficiently for this?
marc40000Member Since 28 Feb 2010
Offline Last Active Jan 30 2013 02:29 PM
- Group Members
- Active Posts 17
- Profile Views 1,544
- Submitted Links 0
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
marc40000 hasn't added any contacts yet.