samedi 24 janvier 2015

Storing files in a file catalog in c++11 using stl containers

I wanted to do a task of storing the files in the file catalog. When the user gives a particular path, I have to recursively search through all the directories and store it in the file catalog.The repeated file name should not be repeated and it has to store only the references to its multiple paths(if any).


here are the list of stl contains I will be using to store



using File=std::string;
using Ref=std::set<std::string>::iterator;
using path=std::string;
using map<File,Ref> filemap;
std::set<path> pathset;


Will this be sufficient or do I have to create a list of Ref (std::list) in the map???....any suggestions?


Aucun commentaire:

Enregistrer un commentaire