I have code:
std::string firstFile = boost::filesystem::path(first->name()).leaf();
But get error:
error conversion from ‘boost::filesystem3::path’ to non-scalar type ‘std::string
How can i fix it?
Thank you.
std::string firstFile = boost::filesystem::path(first->name()).leaf().string();
also note that the leaf
function is deprecated and is removed in Boost.Filesystem V3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With