积极答复者
请教编译错误

问题
-
E:\IMAhou\IMA\Source\DllOrOCX\PropList\answerButton.cpp(58) : error C2664: 'int __thiscall CString::Find(unsigned short) const' : cannot convert parameter 1 from 'char [2]' to 'unsigned short'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast 怎么改呢?谢谢下面是代码部分:
CString answerButton::Convert2HttpFormat(CString filename)
{
CString strFileName = "file:///";int ind= filename.Find("\\");
while (ind != -1)
{
strFileName += filename.Left(ind);
strFileName += "//";
//str += "\\";
filename = filename.Right(filename.GetLength() - ind - 1);
ind = filename.Find("\\");
}
strFileName += filename;
return strFileName;
}
答案
全部回复
-
哦,谢谢您,但是出现
idl : error MIDL2212 : error while writing to file .\PropList_i.c
Error executing midl.exe.
Error: Could not delete file "E:\IMAhou\IMA\Source\DllOrOCX\PropList\PropList_i.h" : 拒绝访问。
Error: Could not delete file "E:\IMAhou\IMA\Source\DllOrOCX\PropList\PropList_i.c" : 拒绝访问。