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 );
}
}
}
本文为“技术点滴”的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。