-
an string array
is there a way to make an string array
exp
std::string test[255];
Code:
if((File = _findfirst( "image*.txt", &c_file )) == -1L)
{
printf("No %s files in current directory!\n");
}
else
{
// printf("%s\n", c_file.name);
TextName = c_file.name;
while( _findnext( File, &c_file ) == 0 )
{
// printf("%s\n", c_file.name);
TextName = c_file.name;
}
_findclose(File);
}
What I need to acomplish is load a text file pull the data from that text file then go to the next file.
-
What does the posted code have to do with the question? Yes, you can make an array of strings (you could also use a vector, which is usually preferred).
Are you asking how to get the results from _findfirst and _findnext into the array? If so, use a vector and call push_back each time to push TextName on to the vector. Then later go through each value in the vector (use the size() method to get its size) and process the file.