<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: &#39;courier new&#39;, monospace; ">void Compilation::getFileNames(vector&lt;string&gt;&amp; listOfFiles)</span><br>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, 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="&#39;courier new&#39;, monospace">	</font></span></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><span class="Apple-tab-span" style="white-space:pre">	</span>boost::filesystem::directory_iterator iterator(string(&quot;.&quot;));</font></div>
<div>
<span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">	</font></span></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, 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="&#39;courier new&#39;, monospace"><span class="Apple-tab-span" style="white-space:pre">		</span>{</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><span class="Apple-tab-span" style="white-space:pre">	</span>� � � ��<span class="Apple-tab-span" style="white-space:pre">	</span>cout &lt;&lt; (iterator-&gt;path().filename())&lt;&lt; endl;</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><span class="Apple-tab-span" style="white-space:pre">			</span></font><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">listOfFiles.push_back(</font><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace; ">iterator-&gt;path().filename()</span></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">� � � � � � � � �);</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">� � � � }</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br>

</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">error:�error C2440: &#39;initializing&#39; : cannot convert from &#39;boost::filesystem3::path&#39; to &#39;std::basic_string&lt;_Elem,_Traits,_Ax&gt;&#39;</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font><br>Thanks in advance.<br><br>aman<br><br clear="all">

</font><div dir="ltr"><i><font face="&#39;courier new&#39;, 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>