Skip to content

Instantly share code, notes, and snippets.

@DaniBarca
Created January 9, 2018 16:48
Show Gist options
  • Save DaniBarca/8044f1803bc2b72c04521ccb3cd538f2 to your computer and use it in GitHub Desktop.
Save DaniBarca/8044f1803bc2b72c04521ccb3cd538f2 to your computer and use it in GitHub Desktop.
List all files in a directory with boost
#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