void MakeSureDirExist(const char * pPath )
{
if ( pPath == NULL)
return;
std:: string strPath( pPath);
if (strPath.at(strPath.length() - 1) != '\\')
strPath += '\\';
int len = strPath.length();
for( int i =0; i < len; ++i)
{
if(strPath[i]== '\\')
{
:: CreateDirectory((strPath.substr(0, i)).c_str(), NULL );
}
}
}
发表回复