void loadImages(const string& src, vector<string> &dest){
directory_iterator end;
path dir(src);
string filename;
int n = 0;
int num;
for (directory_iterator pos(dir); pos != end; ++pos) {
if (is_regular_file(*pos)) {
n++;
}
}
dest.resize(n);
for (directory_iterator pos(dir); pos != end; ++pos) {
if (is_regular_file(*pos)) {
filename = pos->path().filename().string();
num = atoi((filename.substr(0, filename.find("."))).c_str());
dest[num - 1] = pos->path().string();
}
}
}
我该如何解决该错误,还有2个错误:E0308有多个重载函数“ is_regular_file”的实例与参数列表匹配:
enter image description here