问题:在运行例程的时候有这样两句,LPSTR pCh = (LPSTR)(LPCTSTR)m_strURL;LPSTR pName = _tcsrchr(pCh,/) + 1;(其中m_strURL是CString)代码在VS2005中编译报错:error C2665: wcsrchr : none of the 2 overloads could convert all the argument types想请问,这两句代码是要完成什么操作?这个错误又该如何解决呢?谢谢~!
你试试这个 TCHAR *pCh = (TCHAR*)(LPCTSTR)m_strURL; TCHAR *pName=_tcsrchr(pCh,'/')+1;
(VS2005是按宽字节处理的)
让pName指向m_strURL字符串最后一个'/'后一个字符地址 例如 m_strURL值为
pName就指向 default.htm了 如果你对在运行例程的时候有这样两句,LPSTR pCh = (LPSTR)(LPCTSTR)m_strURL;LPSTR pName = _tcsrchr(pCh,/) + 1;(其中m_strURL是CString)代码在VS2005中编译报错:error C2665: wcsrchr : none of the 2 overloads could convert all the argument types想请问,这两句代码是要完成什么操作?这个错误又该如何解决呢?谢谢~!这个问题有好的意见或
建议,请留言
|