Hello,
Before, with boost 1.38 and visual studio 2005, i was using following funtion to retrieve the file names in a folder.
Now i switched to boot 1.46.1 and visual studio 2010, but the following method is not working. Please guide me.
void Compilation::getFileNames(vector<string>& listOfFiles)
{
boost::filesystem::directory_iterator iterator(string("."));
for(; iterator != boost::filesystem::directory_iterator(); ++iterator)
{
cout << (iterator->path().filename())<< endl;
listOfFiles.push_back(iterator->path().filename()
);
}
error: error C2440: 'initializing' : cannot convert from 'boost::filesystem3::path' to 'std::basic_string<_Elem,_Traits,_Ax>'
Thanks in advance.
aman