CString转string CString path; string str2 = path.GetBuffer(); string转CString string RetStr; CString result; result = RetStr.c_str();