#define BOOST_FILESYSTEM_NO_LIB #include #include namespace fs = boost::filesystem; int main() { fs::path cwd("."); fs::directory_iterator i(cwd), end; for(; i != end; ++i) { std::cout << i->path().leaf() << std::endl; } }