Results 1 to 3 of 3

Thread: reinterpret_cast <>

  1. #1

    Thread Starter
    Hyperactive Member Amon Ra's Avatar
    Join Date
    Feb 2001
    Location
    In some cave on Uranus...
    Posts
    500

    reinterpret_cast <>

    is it a good thing to use it? or is it better to use the (TYPE) x way?
    cuz i saw some ppl use the reinterpret_cast and others dopnt use it.. what advice would you guys give about this?
    thanks
    Amon Ra
    The Power of Learning.

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Using the C-style casts shouldn't be done in new C++ programs, it makes much more sense to whoever's reading the code that you do actually want to force the compiler to do something different.

    Note that many compilers will convert (type*) to dynamic_cast<type*> if you give them polymorphic types as arguments. I don't think it's part of the standard though...
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Hyperactive Member Amon Ra's Avatar
    Join Date
    Feb 2001
    Location
    In some cave on Uranus...
    Posts
    500
    ok, cool.. i'll use the new ones then ..thanks Parksie
    Amon Ra
    The Power of Learning.

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