Answers for "extract file path from file name c++"

C++
3

c++ get filename from path

// 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);
Posted by: Guest on April-15-2021

Code answers related to "extract file path from file name c++"

Browse Popular Code Answers by Language