Answer the question
In order to leave comments, you need to log in
C++ list files in current directory
We need a list of files in the current directory (where the program itself is) in the standard way (without including third-party libraries)
I understand correctly that the standard file functions ( ifstream
, ofstream
, ... ) work quite well in the current directory without any windows.h
, dirent.h
, boost, etc. ?..
Is it possible to get a list of files by standard means (for example, by linking "the number of files in a directory" → "get the file name (in a loop) ")?
<filesystem>
?... I don't know. I appealAnswer the question
In order to leave comments, you need to log in
According to the standard, now, STL does not know how to do this. Use the OS API or Boost.Filesystem.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question