c++ - Boost directory_iterator error: no match for operator!= -


i'm starting c++ boost libraries. i'm running issue directory_iterator , recursive_directory_iterator. when try compile following code, no match operator!=. have tried == no avail.

const boost::filesystem::recursive_directory_iterator end(); for(boost::filesystem::recursive_directory_iterator i(p); != end; i++){     if(boost::filesystem::is_regular_file(i->status())){         cout << i->path().filename() << endl;     } } 

any help? thanks!

const boost::filesystem::recursive_directory_iterator end() not define variable end instead declares function prototype function end returns const boost::filesystem::recursive_directory_iterator , not take arguments (search "c++ vexing parse" understand why happens). change const boost::filesystem::recursive_directory_iterator end;.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -