我有这段代码:
int casted_dbValue=3;
wchar_t* nativeData=(wchar_t*)casted_dbValue;
int
与const wchar_t*
之间的转换不正确。如何处理这个错误?
答案 0 :(得分:2)
您是否尝试过_itow
function?
wchar_t * _itow(
int value,
wchar_t *str,
int radix
);
或者,更安全的版本_itow_s
。
第一个参数(value
)是要转换的整数值,第二个是字符串结果,第三个是数值的基数。它返回一个指向str
值的指针。