Archive for October, 2010

C++ Casting Operators

I often get confused about the different types of C++ casts:

  • dynamic_cast can be used for “upcasting” or “downcasting”
    • Upcasting:    A* pA = dynamic_cast<A*>(pB)  when B inherits from A
      
    • Downcasting:  B* pB = dynamic_cast<B*>(pA)  when B inherits from A
      
  • static_cast
    • static_cast conversions are not as safe as dynamic_cast conversions, because static_cast does no run-time type check, while dynamic_cast does.
    • A dynamic_cast to an ambiguous pointer will fail, while a static_cast returns as if nothing were wrong; this can be dangerous.
    • Although dynamic_cast conversions are safer, dynamic_cast only works on pointers or references, and the run-time type check is an overhead. (http://msdn.microsoft.com/en-us/library/5f6c9f8h%28v=VS.100%29.aspx)
  • reinterpret_cast

Where is the MSDN File Transfer Manager installed?

02/25/2011 Update: On my Windows 7 x64 (SP1) machine, I found it located in:

C:\Program Files (x86)\Microsoft File Transfer Manager\TransferMgr.exe

Of course, if you’re running 32-bit, then drop the ” (x86)”.

——————

File Transfer Manager for MSDN can be found in the following location:

%SystemRoot%\Downloaded Program Files\TransferMgr.exe

See http://bit.ly/bMhDVj

Go to Top