📅  最后修改于: 2022-03-11 14:52:15.191000             🧑  作者: Mango
#include
int main() {
struct stat buffer;
std::string string = "Hello";
if (stat(&string.c_str(), &buffer) != 0) {
std::cout << "'Hello' directory doesn't exist!";
} else {
std::cout << "'Hello' directory exists!";
}
}