
Hello I am trying to print out the full "file path" to all the "only" files in a given dir. appriciate any help in checking this code out, I really don't know what not working. thanks #include "/usr/include/boost/filesystem/operations.hpp" #include "/usr/include/boost/filesystem/fstream.hpp" #include "/usr/include/boost/filesystem/path.hpp" #include <iostream> namespace fs = boost::filesystem; int main(){ fs::path full_path( fs::initial_path() ); full_path = fs::system_complete( fs::path( "/home/sam", fs::native ) ); fs::directory_iterator end_itr; for ( fs::directory_iterator itr( full_path ); itr != end_itr; ++itr ) { if ( !fs::is_directory( *itr)) std::cout << *itr << std::endl; } } __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo
participants (1)
-
Fred J.