我试图读取目录中的文件并将每个文件名存储在字符串数组中。我无法让它为我的生活工作。这里的功能: char *readFile(char *dir){
char *fileStringArray[1000];
DIR *dirPointer;
int file_count = 0;
struct dirent *file;
struct stat fileType;
int i = 0;
文件夹我想检查的时候我去了在目录中的所有文件,如果其中一个文件/目录上的项目是文件夹(另一个目录) 代码我有从(使用dirent.h)开始: DIR *dir;
struct dirent *ent;
if ((dir = opendir ("c:\\src\\")) != NULL) {
/* print all the files and directories within d