About 50 results
Open links in new tab
  1. 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 …

  2. Should I cast the result of malloc (in C)? - Stack Overflow

    Although malloc without casting is preferred method and most experienced programmers choose it, you should use whichever you like having aware of the issues. i.e: If you need to compile C …

  3. casting - Converting double to integer in Java - Stack Overflow

    Jun 24, 2011 · is there a possibility that casting a double created via Math.round() will still result in a truncated down number No, round() will always round your double to the correct value, and …

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

  5. Casting objects in Java - Stack Overflow

    Mar 15, 2011 · Casting can be used to clearly state that you are calling a child method and not a parent method. So in this case it's always a downcast or more correctly, a narrowing conversion.

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

  7. Casting from 'System.Int16' to type 'System.Int32'

    May 28, 2024 · I'm willing to bet it has nothing to do with casting and everything to do with boxing. While an implicit cast from int16 to int32 is available, you can't unbox an int16 to int32

  8. c# - Why should casting be avoided? - Stack Overflow

    Aug 1, 2013 · Bad is a relative term. Avoiding casting is a best-practice, but sometimes a programmer has gotta do what a programmer has got to do. (especially if you writing a java …

  9. go - Is this casting in golang? - Stack Overflow

    Jul 13, 2015 · paxPayment, ok = dataObject.(*entities.PassengerPayment) What are the brackets used for? I'm not sure what is going on in this assignment operation. Do you need any more …

  10. casting - Int to Char in C# - Stack Overflow

    Nov 14, 2008 · What is the best way to convert an Int value to the corresponding Char in Utf16, given that the Int is in the range of valid values?