Requirement is:
Need to get all file names in given directory.
I found some ways using third party lib - boost but I am don't want to use it.
I want the solution within standard C++.
Please help me to resolve this requirement.
All suggestions are welcome.
I'd like to add that Boost isn’t exactly “third party” — it is largely written and maintained by people close to (or members of) C++’s steering committee.
I would go as far as to say that any serious C++ programmer should have Boost installed, and it is not unreasonable to require your library/program’s users to have it either.
I want the solution within standard C++... I am using Visual Studio 2010
There IS no solution within standard C++ if you're not using C++17.
I'll say that again.
There IS no solution within standard C++ if you're not using C++17.
Your options are:
1) Come up to C++17 and use std::filesystem
2) Use the Win32 API (which is not part of the C++ standard)
3) Use another library (which, again, is not part of the C++ standard - for example, Boost)