I have some code that has a dynamic-class system in C++ that has a member called GetClassName(), a rather harmless name one would imagine. However when included in a large project with Windows headers all hell broke loose. Apparently Windows uses a #define GetClassName (GetClassNameA or GetClassNameW) which screws up everything, and my virtual call tree became all messed up making me loose a day in stupid compiler debugging in the dark, trying to figure out what was wrong.
So besides the point that I'm cursing Microsoft for using such a horribly easy to clash name for a #define (I mean someone should honestly be shot for this!) I'm asking for 3 purposes.
- What's another good name for GetClassName() ?
- Is there anyway to fix this, so in the future, other developers of my code base won't suffer similar fate
- And for posterity when someone else encounters this similarly inexplicable error