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

    Problem with RTTI

    What is wrong with this code

    Code:
    Obj<TCHAR>* obj = dynamic_cast<Obj<TCHAR>* >(I->objects[0]);
    Which is resulting in this error

    Code:
    A dynamic cast is present, but the correct RTTI option is not specified.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: Problem with RTTI

    Maybe you have to specify some copiler option to let it generate extra code to enable the dynamic_cast keyword to work?
    At least, it is what IBM compiler requires: http://publib.boulder.ibm.com/infoce...2Fruoptrtt.htm
    Victor Nijegorodov

  3. #3
    Join Date
    Apr 2005
    Posts
    1,828

    Re: Problem with RTTI

    Quote Originally Posted by VictorN View Post
    Maybe you have to specify some copiler option to let it generate extra code to enable the dynamic_cast keyword to work?
    At least, it is what IBM compiler requires: http://publib.boulder.ibm.com/infoce...2Fruoptrtt.htm
    What are those compiler options that I have to specify?

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: Problem with RTTI

    How could I know it?
    Ask your compiler documentation! Read its Help...
    Victor Nijegorodov

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