【发布时间】:2012-08-16 19:38:33
【问题描述】:
说你有“方法”
int Read(...)
{
unsigned char Byte = 0;
if(!ReadFile(.., &byte, 1,...))
return -1;
return Byte;
}
int ReadBlock(LPWSTR buffer, int cchBuffer ...)
{
int c = 0;
int cnt = 0;
do
{
if( (c=Read(...)) != -1 )
buffer[num++] = c; // Here.
} while( num < ccBuffer );
return cnt;
}
将 int 正确地转换为 WCHAR 的正确方法是什么?
【问题讨论】:
-
你有什么问题?
-
(wchar_t)the_int有什么问题?
标签: c++ windows type-conversion wchar