📌  相关文章
📜  c++ 从路径获取文件名 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:50.511000             🧑  作者: Mango

代码示例1
// get filename
std::string base_filename = full_path.substr(full_path.find_last_of("/\\") + 1);

// remove extension from filename
std::string::size_type const p(base_filename.find_last_of('.'));
std::string file_without_extension = base_filename.substr(0, p);