1、tchar * ---------> cstring
<pre name="code" class="cpp">TCHAR *path;
CString str;
str.Format(_T("%s"),path);
2、cstring --- >string
std::string strStl;
strStl=str.GetBuffer(0);
3、string --->cstring
CString strpath;
strpath=dir.c_str();
4、cstring --->TCHAR *
TCHAR m_buf[1000];
_tcscpy(m_buf, strpath);
5、其他:string 拼接
string dir= strStl;
dir += name;