C++ 如何从文件路径获取文件';她叫什么名字?
我从堆栈溢出帖子复制了一段代码:C++ 如何从文件路径获取文件';她叫什么名字?,c++,C++,我从堆栈溢出帖子复制了一段代码: for(const auto&entry:std::filesystem::recursive\u directory\u iterator(替换)){ } 由于同样的注释(entry.path() 编辑:我需要名称为未签名字符*这是否回答了您的问题@Itay123std::string具有c_str()方法,该方法提供一个指针,而不是传递loadpng::decode(yourString)您将执行loadpng::decode(yourString.c_s
for(const auto&entry:std::filesystem::recursive\u directory\u iterator(替换)){
}
由于同样的注释(entry.path()
编辑:我需要名称为未签名字符*
这是否回答了您的问题@Itay123std::string
具有c_str()
方法,该方法提供一个指针,而不是传递loadpng::decode(yourString)
您将执行loadpng::decode(yourString.c_str())