Boost logo

Boost Users :

Subject: [Boost-users] question for use filesystem in vc++ with PPL
From: young (yqin_99_at_[hidden])
Date: 2012-06-12 15:42:18


I have question for use filesystem in vc++ with PPL. The code is listed here:

#include <ppl.h>
#include <boost/filesystem.hpp>
        
namespace fs = boost::filesystem;
std::vector<std::string> vFiles;
fs::path path(dir);
fs::directory_iterator end_dir;
Concurrency::parallel_for((fs::directory_iterator) (path), end_dir,
[&](fs::directory_iterator it)
{
        if(!(fs::is_directory(it->status())))
        {
                vFiles.push_back(it->path().filename().string());
        }
});

But it build failed with message:
Eerror C2653: 'fs' : is not a class or namespace name

what is wrong? I use Visual Studio 2010.

--
View this message in context: http://boost.2283326.n4.nabble.com/question-for-use-filesystem-in-vc-with-PPL-tp4631195.html
Sent from the Boost - Users mailing list archive at Nabble.com.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net