Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ file exists

/*-------------------------------------------------------------------
    Returns a boolean indicating whether a file exists 
-------------------------------------------------------------------*/
bool FileExists(string Filepath)
{
   struct stat buffer;
   return (stat (Filepath.c_str(), &buffer) == 0);
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #file #exists
ADD COMMENT
Topic
Name
4+5 =