<div dir="ltr"><font size="2"><font class="Apple-style-span" face="georgia, serif">Hello,</font><br><font class="Apple-style-span" face="georgia, serif">Before, with boost 1.38 and visual studio 2005, i was using following funtion to retrieve the file names in a folder.�</font><br> <font class="Apple-style-span" face="georgia, serif">Now i switched to boot 1.46.1 and visual studio 2010, but the following method is not working. Please guide me.</font><br><br><span class="Apple-style-span" style="font-family: 'courier new', monospace; ">void Compilation::getFileNames(vector<string>& listOfFiles)</span><br> <div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-tab-span" style="white-space:pre"> </span>{</font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="'courier new', monospace"> </font></span></div> <div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-tab-span" style="white-space:pre"> </span>boost::filesystem::directory_iterator iterator(string("."));</font></div> <div> <span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="'courier new', monospace"> </font></span></div><div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-tab-span" style="white-space:pre"> </span>for(; iterator != boost::filesystem::directory_iterator(); ++iterator)</font></div> <div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-tab-span" style="white-space:pre"> </span>{</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-tab-span" style="white-space:pre"> </span>� � � ��<span class="Apple-tab-span" style="white-space:pre"> </span>cout << (iterator->path().filename())<< endl;</font></div> <div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-tab-span" style="white-space:pre"> </span></font><font class="Apple-style-span" face="'courier new', monospace">listOfFiles.push_back(</font><span class="Apple-style-span" style="font-family: 'courier new', monospace; ">iterator->path().filename()</span></div> <div><font class="Apple-style-span" face="'courier new', monospace">� � � � � � � � �);</font></div><div><font class="Apple-style-span" face="'courier new', monospace">� � � � }</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br> </font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace">error:�error C2440: 'initializing' : cannot convert from 'boost::filesystem3::path' to 'std::basic_string<_Elem,_Traits,_Ax>'</font></div> <div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><font class="Apple-style-span" face="'courier new', monospace"><br></font><br>Thanks in advance.<br><br>aman<br><br clear="all"> </font><div dir="ltr"><i><font face="'courier new', monospace" style="background-color:rgb(255, 255, 255)" color="#009900">Always have your stuff when you need it with @Dropbox. 2GB account is free! <a href="http://db.tt/xOEJ2Ag" target="_blank">http://db.tt/xOEJ2Ag</a></font></i></div> <br> </div>