RT下面的程序老是通不过编译,转换失败
static const uint16 szNoMem[8][21] =
{
L"Memory low!",
L"Restart the comp",
L"and try again.",
L"If you see this",
L"info again, please",
L"contact us",
L"***************"
};
static const uint16 szNoMem[8][21] =
{
L"Memory low!",
L"Restart the comp",
L"and try again.",
L"If you see this",
L"info again, please",
L"contact us",
L"***************"
};
不知道你的平台是什么,我的Vc6里没有uint16 类型。应该使用 unsigned short 类型。
通常L引号里面是UNICODE编码
是BREW平台,C++
忘了写:
typedef unsigned short uint16;错误信息是:Error 39 error C2440: 'initializing' : cannot convert from 'const wchar_t [17]' to 'const uint16
L"Restart the comp",
L"and try again.",
L"If you see this",
L"info again, please",
L"contact us",
L"***************"
是不是不匹配,我犯了一下windows程序设计,也没有法现,它们之间可以进行转化。
static const wchar_t* szNoMem[21] =
{
L"Memory low!",
L"Restart the comp",
L"and try again.",
L"If you see this",
L"info again, please",
L"contact us",
L"***************"
};
L"Restart the comp",
L"and try again.",
L"If you see this",
L"info again, please",
L"contact us",
L"***************",为unicode的宽字符,它们之间要是能够转化用编译器会编译过去的,看起来是不能转化。