69,373
社区成员
发帖
与我相关
我的任务
分享
char path[200];
memset(path,0,sizeof(path));
if(getcwd(path, sizeof(path)-1) != NULL)
{
printf("当前目录=%s",path);
}
strcat(path,"/temp/");
if(access(path,F_OK) == 0)
{
printf("\ntemp目录(%s)已存在\n",path);
}
else
{
if(mkdir(path,0755)== -1)
{
printf("\ntemp目录(%s)创建失败\n",path);
return 0;
}
}