About 2,180,000 results
Open links in new tab
  1. Python: typing.cast vs built in casting - Stack Overflow

    Jan 4, 2023 · 23 str(x) returns a new str object, independent of the original int. It's only an example of "casting" in a very loose sense (and one I don't think is useful, at least in the …

  2. What are the rules for casting pointers in C? - Stack Overflow

    Jun 23, 2013 · There are rules about casting pointers, a number of which are in clause 6.3.2.3 of the C 2011 standard. Among other things, pointers to objects may be cast to other pointers to …

  3. 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: …

  4. Type-casting in C++ - Stack Overflow

    Jan 30, 2015 · Casting one of the operands of / to double which will lead to the other getting implicitly converted to a double too, and thus the division (and its result) would now be floating …

  5. 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

  6. 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<> (), …

  7. 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 …

  8. C++ casting: how does casting really works - Stack Overflow

    Dec 22, 2022 · 2 I'm trying to understand how casting between base & derived types exactly works in C++. So I wrote a small proof-of-concept program

  9. 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 …

  10. 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 …