char part_name[MAX_FSPEC_SIZE];
string filePath = part_name;//char转string
string extendName;
int iBeginIndex = filePath.find_last_of("\\") + 1;
int iEndIndex = filePath.length();
extendName = filePath.substr(iBeginIndex, iEndIndex - iBeginIndex);//提取图档名称
int iEndIndex01 = extendName.length();
string extendName01 = filePath.substr(0, iEndIndex - iEndIndex01);//提取图档路径
const char* charPtr = extendName01.c_str();//string转char
char destination[256] = "";
strncpy(destination, charPtr, 256);//char* 转 char[]