Answers for "c++ how to check whether a file exists?"

C++
0

c++ how to check whether a file exists?

#include <filesystem>

void do_something()
{
 	if (std::filesystem::exists(FILE_PATH))
    {
     	std::cout << "yes, that file exists" << std::endl; 
    }
}
Posted by: Guest on February-03-2022

Code answers related to "c++ how to check whether a file exists?"

Browse Popular Code Answers by Language