AliR.
On Apr 24, 5:59 pm, Joseph M. Newcomer <newco...@flounder.com> wrote:
If you have turned on Run Time Type Information (RTTI, on by default in
VS2005, if I
recall), you can find out what the type is, and even the print string for
the class name.
Look at RTTI.
This is not the question you asked, but I'm interpreting what I think you
might have
meant.
joe
On 24 Apr 2007 11:29:14 -0700, wanwan <ericwa...@yahoo.com> wrote:
is there a function that returns to me the class of an instance?
Joseph M. Newcomer [MVP]
email: newco...@flounder.com
Web:http://www.flounder.com
MVP Tips:http://www.flounder.com/mvp_tips.htm
Sorry, that's not what I need.
For example, I have a base class called CPerson, and I have two
derived classes called CMale and CFemale. I use CList class to keep
track of a list of CPerson objects. After I retrieve the object from
the list, I need a function to find out what derived class the object
is, so I can cast the object accordingly for data processing.