Reputation: 83
I'm experiencing a problem. This is related to boost::filesystem. I'm getting this error:
error: ‘class boost::filesystem::directory_entry’ has no member named ‘filename’
. Have they deprecated it or what?
The code is: string FileName = i->filename( );
Upvotes: 1
Views: 555
Reputation: 392979
filename()
is a member of path
, not directory_entry
.
Just do
std::string FileName = i->path().filename();
See it Live On Coliru
Upvotes: 1