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; 
    }
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #check #file
ADD COMMENT
Topic
Name
7+8 =