Top "Casting" questions

Casting is a process where an object type is explicitly converted into another type if the conversion is allowed.

Multi-character constant warnings

Why is this a warning? I think there are many cases when is more clear to use multi-char int constants …

c++ c casting compiler-warnings portability
Typecasting in Python

I need to convert strings in Python to other types such as unsigned and signed 8, 16, 32, and 64 bit ints, doubles, floats, …

python string int bit casting
Cannot convert string to GUID in C#.NET

Why would the cast (to a System.Guid type) statement be invalid (second line in try block)? For example, suppose …

c# string .net-3.5 casting guid
What is the difference between static_cast<> and C style casting?

Is there any reason to prefer static_cast<> over C style casting? Are they equivalent? Is their any …

c++ casting static-cast
C# : 'is' keyword and checking for Not

This is a silly question, but you can use this code to check if something is a particular type... if (…

c# casting keyword
How do I convert a single char to a string?

I'd like to enumerate a string and instead of it returning chars I'd like to have the iterative variable be …

c# string casting char
Typescript: Index signature is missing in type

I want MyInterface.dic to be like a dictionary name: value, I define it as follows: interface MyInterface { dic: { [name: …

casting typescript
convert unsigned char* to std::string

I am little poor in typecasting. I have a string in xmlChar* (which is unsigned char*), I want to convert …

c++ casting unsigned tizen
How to check that a string is an int, but not a double, etc.?

PHP has an intval() function that will convert a string to an integer. However I want to check that the …

php string casting types int
convert from long long to int and the other way back in c++

How to convert from long long to int and the other way back in c++ ?? also what are the properties …

c++ casting int long-integer