The code of readFilenames for windows users has two problem as below:
- When dealing with the situation no files found, will cause no return value problem.
...
if ((dir = FindFirstFile((directory + "/*").c_str(), &file_data)) == INVALID_HANDLE_VALUE)
return; // no files found
do {
...
- Add full_file_name into vector of filenames, cause the program can not find files.
...
filenames.push_back(full_file_name);
} while (FindNextFile(dir, &file_data));
....