【发布时间】:2010-09-21 01:08:45
【问题描述】:
我已经阅读了What's the best way to check if a file exists in C? (cross platform) 的答案,但我想知道是否有更好的方法可以使用标准 c++ 库来做到这一点?最好根本不尝试打开文件。
stat 和 access 几乎都无法通过 Google 搜索。我应该#include 来使用这些?
【问题讨论】:
-
用于访问(实际上可能是 _access)。 -
是的,正如therefromhere指出的那样。