CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    4

    Class identifier

    Heard that classes in VC have a identifier. Would like to know how this is done, and what it is, a string or something like that. (A Macro?)

    (needed for serializing classes, and build somekind of check in it... and i know that it is not nice looking..but what the XXX think i programmed to much Java)

    (Please not MFC or STL examples... try to avoid them as much as possibel, MFC due to the fact that u loose the perspective, STL cause it becomes hard to read for others althroug i must say that an apply a very strong mechanism is)



  2. #2
    Join Date
    May 1999
    Posts
    69

    Re: Class identifier

    There are two mechanisms that I know about, namely RTTI and MFC's version of RTTI. The latter is historic. RTTI (Run Time Type Information) is part of the Ansi C++ standard.

    There is a project option which will need enabling, i.e. "Enable Run Time Type Information".

    Search for RTTI under the VC++ help (I've not got access at the moment). I think the C++ command is type_info.

    Hope that helps.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured