返回一个临时数组?
变量生命期?
CString m_strFullPath;
m_strFullPath = PathCombine2(m_szModuleFilePath, m_strAccessFile);
CString PathCombine2(LPCTSTR lpszDir, LPCTSTR lpszFile)
{
TCHAR szDestPath[MAX_PATH];
if (PathCombine(szDestPath, lpszDir, lpszFile) == NULL)
return "";
return szDestPath;
}
no problem?
微软的定义http://msdn.microsoft.com/en-us/library/aa300557(v=vs.60).aspx
微软都给你实现了=操作,你还确定要临时构造个CString?