About 2,250,000 results
Open links in new tab
  1. Regular cast vs. static_cast vs. dynamic_cast - Stack Overflow

    Aug 26, 2008 · Static cast is also used to cast pointers to related types, for example casting void* to the appropriate type. dynamic_cast Dynamic cast is used to convert pointers and references …

  2. c# - Direct casting vs 'as' operator? - Stack Overflow

    Sep 25, 2008 · Direct Casting Types don't have to be strictly related. It comes in all types of flavors. Custom implicit/explicit casting: Usually a new object is created. Value Type Implicit: …

  3. c++ - When should static_cast, dynamic_cast, const_cast, and ...

    The C-style casts can do virtually all types of casting from normally safe casts done by static_cast<> () and dynamic_cast<> () to potentially dangerous casts like const_cast<> (), …

  4. Casting variables in Java - Stack Overflow

    Mar 13, 2011 · Regarding use for casting, you still see the need for it in some libraries. Pre Java-5 it was used heavily in collections and various other classes, since all collections worked on …

  5. vb.net - Casting in visual basic? - Stack Overflow

    VB actually has 2 notions of casting. CLR style casting Lexical Casting CLR style casting is what a C# user is more familiar with. This uses the CLR type system and conversions in order to …

  6. Safe casting in python - Stack Overflow

    Casting has sense only for a variable (= chunk of memory whose content can change) There are no variables whose content can change, in Python. There are only objects, that aren't …

  7. casting - Explanation of ClassCastException in Java - Stack Overflow

    May 25, 2009 · Do you understand the concept of casting? Casting is the process of type conversion, which is in Java very common because its a statically typed language. Some …

  8. c# - 'casting' with reflection - Stack Overflow

    Sep 9, 2009 · 'casting' with reflection Asked 16 years, 1 month ago Modified 4 years, 6 months ago Viewed 65k times

  9. Casting int to bool in C/C++ - Stack Overflow

    Jul 22, 2015 · 58 I know that in C and C++, when casting bools to ints, (int)true == 1 and (int)false == 0. I'm wondering about casting in the reverse direction... In the code below, all of the …

  10. casting - How to cast or convert an unsigned int to int in C?

    Feb 26, 2011 · The real question is what you want to do when/if the value in the unsigned int it out of the range that can be represented by a signed int. If it's in range, just assign it and you're …