About 719,000 results
Open links in new tab
  1. What exactly is a type cast in C/C++? - Stack Overflow

    What exactly is a type cast in C/C++? How does the compiler check if an explicit typecast is needed (and valid)? Does it compare the space required for an value? If I have for example: …

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

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

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

  6. TypeScript or JavaScript type casting - Stack Overflow

    How does one handle type casting in TypeScript or Javascript? Say I have the following TypeScript code: module Symbology { export class SymbolFactory { createStyle( symbolInfo :

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

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

  9. JavaScript type casting - Stack Overflow

    Jan 23, 2013 · 0 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 …

  10. string - Typecasting in Python - Stack Overflow

    May 1, 2016 · 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?