i need to read in a char array and check each character for validity as a dos filename. my problem is loading the array, accessing each element, then moving on to the next line of data.
i need to read in a char array and check each character for validity as a dos filename. my problem is loading the array, accessing each element, then moving on to the next line of data.
I'm not quite sure what you mean. But I'll give it a try. You can create an array of filenames:
Load the array with strcpy:Code:char filenames [NR_OF_FILENAMES][FILENAME_LEN];
And traverse to the array with:Code:strcpy (filename [index], just_a_filename);
If my interpretation of your question is incorrect, please give some more information.Code:for (index = 0; index < NR_OF_FILENAMES; index++) do something with filename [index]