C++

Asked • 06/19/19

Fastest way to check if a file exist using standard C++/C++11/C?

I would like to find the fastest way to check if a file exist in standard C++11, C++, or C. I have thousands of files and before doing something on them I need to check if all of them exist. What can I write instead of `/* SOMETHING */` in the following function? inline bool exist(const std::string& name) { /* SOMETHING */ }

1 Expert Answer

By:

Brandon E. answered • 01/26/25

Tutor
New to Wyzant

Seasoned Software Engineer specializing in C++, C# or Java

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.