title: Help me debug this - C++ Boost
body: <p>I am noob to C++ Boost. Can anyone here help me to debug this program.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;boost/filesystem/operations.hpp&gt;
  #include &lt;boost/filesystem/fstream.hpp&gt;
  using namespace boost::filesystem; 
  using namespace std;
  
  void show_files( const path &amp; directory, bool recurse_into_subdirs = true )
  {
    if( exists( directory ) )
    {
      directory_iterator end ;
      for( directory_iterator iter(directory) ; iter != end ; ++iter )
        if ( is_directory( *iter ) )
        {
          cout &lt;&lt; iter-&gt;native_directory_string() &lt;&lt; " (directory)\n" ;
          if( recurse_into_subdirs ) show_files(*iter) ;
        }
        else 
          cout &lt;&lt; iter-&gt;native_file_string() &lt;&lt; " (file)\n" ;
    }
  }
  
  int main()
  {
      show_files( "." ) ;
  }
  </code></pre>
  
  <p>Wen I am trying to run this program I am getting error like </p>
  
  <pre><code>ex2.cpp: In function ‘void show_files(const boost::filesystem2::path&amp;, bool)’:
  ex2.cpp:15: error: ‘class boost::filesystem2::basic_directory_entry&lt;boost::filesystem2::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem2::path_traits&gt; &gt;’ has no member named ‘native_directory_string’
  ex2.cpp:19: error: ‘class boost::filesystem2::basic_directory_entry&lt;boost::filesystem2::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem2::path_traits&gt; &gt;’ has no member named ‘native_file_string’
  </code></pre>
  
  <p>Tanx in advance. P.S. This program will list out all files/folders</p>