TCHAR szPathMAX_PATHGetModuleFileNameNULLreversefind,szPathreversefind,MAX_PATHCString strPath = szPathint index = strPathReverseFind_T #39#39strPath = strPathLeftindex + 1reversefind你。
CString File_nameCFileFind fileBOOL nContinuenContinue = fileFindFilePathif!nContinuereturnwhilenContinue nContinue = fileFindNextFileiffileIsDotscontinueelse iffileIsDirectory CString Cpathint Index = PathReverseFind#39#39Cpath = Path。
1如果是MFCreversefind的话reversefind,可以用CString 类的方法ReverseFind,它返回的索引就是位置2通过STL的string 的 rfind方法3也可以自己写int ReverseFind char* p, char cFind char* pp = p + strlenpint nIndex = strlenpwhile 1 if ppnIndex == c return strlen。
CString csDir,csFilecsDir=quotCprogram filesM11txtquotcsFile=csDirRightcsDirGetLengthcsDirReverseFind#39#391AfxMessageBoxcsFilestring。
上一篇: 腾讯主页,腾讯主页是什么
联系电话:18300931024
在线QQ客服:616139763
官方微信:18300931024
官方邮箱: 616139763@qq.com