About 624,000 results
Open links in new tab
  1. What is the difference between type casting and type conversion …

    Oct 29, 2010 · Typecasting is just taking a pen and writing "this is now a int" on the variable, conversion is actually convert the content to the desired type so the value keeps having a sense.

  2. Typecasting of pointers in C - Stack Overflow

    Aug 10, 2016 · Typecasting of pointers in C Asked 12 years, 10 months ago Modified 3 years, 11 months ago Viewed 75k times

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

    Jun 23, 2013 · When thinking about pointers, it helps to draw diagrams. A pointer is an arrow that points to an address in memory, with a label indicating the type of the value. The address …

  4. casting int to char using C++ style casting - Stack Overflow

    Jul 25, 2013 · You should use static_cast<char>(i) to cast the integer i to char. reinterpret_cast should almost never be used, unless you want to cast one type into a fundamentally different …

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

    40 A void pointer is a generic object pointer and C supports implicit conversion from a void pointer type to other types, so there is no need of explicitly typecasting it.

  6. JavaScript type casting - Stack Overflow

    Jan 23, 2013 · Not sure if this answers the question, but there is a new library for getting around all of Javascript's Typecasting weirdnesses: Typecast.js In a sentence, Typecast solves all the …

  7. Typecasting in C# - Stack Overflow

    Aug 27, 2009 · What is type casting, what's the use of it? How does it work?

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

    Sep 25, 2008 · void Handler(object o, EventArgs e) { // I swear o is a string string s = (string)o; // 1 //-OR- string s = o as string; // 2 // -OR- string s = o.ToString(); // 3 } What is the difference …

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

    Use dynamic_cast for converting pointers/references within an inheritance hierarchy. Use static_cast for ordinary type conversions. Use reinterpret_cast for low-level reinterpreting of bit …

  10. string - Typecasting in Python - Stack Overflow

    Dec 22, 2008 · I need to convert strings in Python to other types such as unsigned and signed 8, 16, 32, and 64 bit ints, doubles, floats, and strings. How can I do this?