Created
January 9, 2018 16:48
-
-
Save DaniBarca/8044f1803bc2b72c04521ccb3cd538f2 to your computer and use it in GitHub Desktop.
List all files in a directory with boost
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include "boost/filesystem.hpp" | |
int main(int argc, char *argv[]) | |
{ | |
std::string path = "."; | |
for(auto & p : boost::filesystem::directory_iterator( path )){ | |
std::cout << p << std::endl; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment