Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这段代码:
int casted_dbValue=3; wchar_t* nativeData=(wchar_t*)casted_dbValue;
int到 const之间的转换不正确wchar_t*。如何处理这个错误?
int
wchar_t*
你试过这个_itow功能吗?
_itow
wchar_t * _itow( int value, wchar_t *str, int radix );
或者,更安全的版本,_itow_s.
_itow_s
第一个参数(value)是要转换的整数值,第二个是字符串结果,第三个是数值的基数。它返回一个指向该str值的指针。
value
str