I read a bit about this on another post and that is why I wanted to save all of the file names to an array. In doing so I can then easily open and close each file in a loop while editing them.
...
Type: Posts; User: bnickerson
I read a bit about this on another post and that is why I wanted to save all of the file names to an array. In doing so I can then easily open and close each file in a loop while editing them.
...
I understand that they are not the same. However, is there any error in the code I have posted? It gives me what I want namely an array "file_locations" consisting of elements
P1_8mag_1.txt...
Sorry there is no error, I forgot to inlude
#include<string.h>
Thanks again for you help
Thank you Tclausex,
Is there any benefit to using one or the other? Or is it simply preference?
char file_name[40];
char file_locations[N][40]; // array of 16 pointers (*)
Hello,
I am trying to create an array of file names such that when I want to open one of the files, who's name is given in the array, I can call that element of the array.
My code for making...