Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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; 
    }
}
 
PREVIOUS NEXT
Tagged: #check #file
ADD COMMENT
Topic
Name
6+9 =