宏的使用不对
error C2664: “MakeSureDirectoryPathExists”: 不能将参数 1 从“TCHAR [13]”转换为“PCSTR”
int main ()
{
#ifdef _UNICODE
#undef _UNICODE //我已经取消掉了,那么TCHAR则是char!!!
TCHAR strDirectory[]=_T("c:\\1111\\222\\");
if (!PathFileExists(strDirectory))
{
char strTemp[MAX_PATH]={0};
// _tcsncpy(strTemp,strDirectory,lstrlen(strDirectory));
//PathRemoveBackslash(strDirectory);
//PathAddBackslash(strDirectory);
MakeSureDirectoryPathExists(strDirectory); //error,取消掉宏了,为什么还出错?
}
#endif
return 0;
}