No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
This program should traverse a directory and save the file names into an array so I can manipulate data within the files. The problem is that the program prints the name of the files in the first loop, but it only saves the last file name in the array. Below … | |
Re:
Hi! I have to make a program, wich lists all files in current dir, and then save all file names into an array. My program doesn't work ! Can you tell me why? Thanks a lot:)[code=c] #include <dirent.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <dirent.h> int main(void) { FILE … |