如何将const undesign short *转换成CString?
书上的例子,语句有错.
catch(_com_error e)
{
CString str;
str=e.ErrorMessage;
str="1"+str;
AfxMessageBox(str);
}
error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'const char *(__thiscall _com_error::*)(void) const' (or there is no acceptable conversion)
Error executing cl.exe.
问题点数:20、回复次数:3Top
1 楼stonespace(stonespace)回复于 2002-09-29 21:17:11 得分 20
改为:
catch(_com_error e)
{
CString str;
str=e.ErrorMessage();
str="1"+str;
AfxMessageBox(str);
}Top
2 楼hanwg()回复于 2002-09-29 21:19:13 得分 0
同意 stonespace(stonespace),您真行,比我还快。Top
3 楼cdyhj(中华之星)回复于 2002-09-29 21:26:28 得分 0
真是疏忽大意。Top
相关问题
- 如何将CString类型转化为const unsigned short*类型?
- 在这样的类型编译器报错 如何转换 Class CString' to 'const unsigned short *'
- const CString& CString::operator=(const CString& stringSrc)中的问题
- 请问怎么取得CString的const char* ?
- CString转化为const char*的问题
- CString GetFile() const;中的const怎么放在后面?
- error C2664: 'strcpy' : cannot convert parameter 2 from 'class CString (void) const' to 'const char *'
- How to convert "const char* "to "unsigned short**" in VC++
- CRecordset::GetFieldValue(short,CString)出错
- const?




