Original Post
Is it possible to create a class, and that kind of do inverse casting? What I''m thinking is something along these lines:
I have a (semi-)global pointer to an array of pointers to my THING class, and a lot of functions that take ID numbers to THINGs (stored in the class), look them up in the array, and use them. What I''d like to do is be able to allow these functions to take either a DWORD (ID) or a THING* but that would mean somehow writing an operator to cast a DWORD to a THING* by taking the DWORD and looking it up in the array. Is it possible to make a standard type cast into your class and define how it does so?