System :: Int32をwchar_t *に変換する方法
-
14-11-2019 - |
質問
このコードを持っています:
int casted_dbValue=3;
wchar_t* nativeData=(wchar_t*)casted_dbValue;
.
int
からconst wchar_t*
の間の誤った変換です。このエラーにどのように対処することができますか?
解決
Have you tried the _itow
function?
wchar_t * _itow(
int value,
wchar_t *str,
int radix
);
Or, the more secure version, _itow_s
.
The first parameter (value
) is the integer value to be converted, the second is the string result, and the third is the base of the numeric value. It returns a pointer to the str
value.
所属していません StackOverflow