Top "Type-conversion" questions

Type conversion is the way of implicitly or explicitly changing an entity of one data type into another.

How to convert char* to wchar_t*?

I've tried implementing a function like this, but unfortunately it doesn't work: const wchar_t *GetWC(const char *c) { const …

c++ winapi unicode mingw type-conversion
How to convert string to integer in C#

How do I convert a string to an integer in C#?

c# .net string int type-conversion
Signed to unsigned conversion in C - is it always safe?

Suppose I have the following C code. unsigned int u = 1234; int i = -5678; unsigned int result = u + i; What implicit …

c type-conversion
How to convert a number to string and vice versa in C++

Since this question gets asked about every week, this FAQ might help a lot of users. How to convert an …

c++ string type-conversion numeric c++-faq
Converting List<String> to String[] in Java

How do I convert a list of String into an array? The following code returns an error. public static void …

java type-conversion
convert string to number node.js

I'm trying to convert req.params to Number because that is what I defined in my schema for year param. …

node.js string type-conversion
How to convert number of minutes to hh:mm format in TSQL?

I have a select query that has DURATION column to calculate number of Minutes . I want to convert those minutes …

sql-server tsql sql-server-2008 type-conversion datediff
How do I print bytes as hexadecimal?

I know in C# you can use String.Format method. But how do you do this in C++? Is there …

c++ bytearray type-conversion data-conversion
Converting char[] to byte[]

I would like to convert a character array to a byte array in Java. What methods exists for making this …

java arrays type-conversion
Ruby: How to convert a string to boolean

I have a value that will be one of four things: boolean true, boolean false, the string "true", or the …

ruby string boolean type-conversion