C++ builder 2009 出错:E2034Cannot convert 'wchar_t *' to 'const char*'
在编译的时候没有通过,C++ builder 2009 出错:E2034Cannot convert 'wchar_t *' to 'const char*',怎么解决?? C++?builder?2009? E2034
[解决办法]
AnsiString strCom = AnsiString().sprintf("COM%d", RadioGroup1->ItemIndex + 1);
HANDLE hComm = CreateFile(strCom.c_str(), GENERIC_READ
[解决办法]
GENERIC_WRITE,
0, NULL, OPEN_EXISTING, 0, 0);
if (INVALID_HANDLE_VALUE == hComm)
{
MessageBox(0, "打开通信端口错误!!", "Comm Error", MB_OK);
return;
}