Question: how to check if directory/file exist using c/c++?
Answer: inline bool exist(const std::string& name) { ifstream file(name); if(! file) // If the file was not found, then file is 0, i.e. ! file=1 or true. return false; // The file was not found.