xiaohuihui123

#include <stdio.h>
#include <process.h>
#include <dir.h>

int main(void)
{
int status;
system("cls");
status = mkdir("book"); /*这是在程序所在当前文件夹下创建book*/
(!status) ? (printf("Directory created\n")) :
(printf("Unable to create directory\n"));
system("pause");
system("dir"); /*显示创建后当前文件夹下的文件信息*/
system("pause");

status = rmdir("book"); /*删除创建的文件夹book*/
(!status) ? (printf("Directory deleted\n")) :
(perror("Unable to delete directory"));
system("pause");
return 0;
}

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
  • 2022-01-01
  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
  • 2021-08-09
猜你喜欢
  • 2021-11-17
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案