提供一个创建文件函数:int CCommonFunc::CreateDirectory(char *pPath)
{
CString stPath;
stPath =pPath;
if(stPath.IsEmpty()) return -1;
if(stPath.Mid(stPath.GetLength()-1)!="\\")
stPath +="\\";
int iPos;
iPos =stPath.Find("\\",0);
CString stDir;
while(iPos>=0)
{
stDir =stPath.Left(iPos);
_mkdir(stDir);
iPos =stPath.Find("\\",iPos+1);
}
return 0;
}