#include <iostream> #include<vector> #include<list> #include<map> #include<queue> #include<fstream> #include<string> #include <filesystem> namespace fs = std::filesystem; using namespace std; string path = "C:/Users/deonh/Downloads/intranets/intranet1"; //This gets every single file in the directory string path5 = "C:/Users/deonh/Downloads/intranets/intranet5"; string path7 = "C:/Users/deonh/Downloads/intranets/intranet7"; <pre>int main() { list<string>pages; map<string, int> page; //Here I am printing the files to make sure the above code works. for (const auto& entry : fs::directory_iterator(path)) { cout<< entry.path()<< std::endl; pages.push_back(entry.path()); } for (list<string> ::iterator it = pages.begin(); it != pages.end(); it++) { cout << *it << endl; } return 0; }
pages.push_back(entry.path());
pages.push_back(path);
pages.push_back(entry.path().string());
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)