创建一个目录在C或C ++ [英] Creating a directory In C or C++
本文介绍了创建一个目录在C或C ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何创建与C code(比分叉和使用的mkdir的方法等)的目录?有没有像dirent.h什么? dirent.h只允许读取目录。 (不使用外部库)
How to create a directory with C code (other than the method of forking and using mkdir) ? Is there anything like dirent.h? dirent.h only allows to read directories. (without using external library)
推荐答案
使用的mkdir功能。
#include <sys/stat.h>
#include <sys/types.h>
int mkdir(const char *pathname, mode_t mode);
这篇关于创建一个目录在C或C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文