Hello i have issue and i can't doing and i am gonna getting crazy about that.
I always taking same problem with VS Code and Microsoft Visual Studio. I checked many forums and lots of websites but nothing work ...
I am trying to find extensions files with giving path but any code doesn't becasue of filesystem libary or class (i don't know what is )
Severity Code Description Project File Line Suppression State
Error (active) E0020 identifier "recursive_directory_iterator" is undefined autosvn C:\Users\BATUHAN\source\repos\AUTOSVNProject\autosvn\autosvn\autosvn.cpp 15
deneme.cpp:5:21: error: 'filesystem' is not a namespace-name
namespace fs = std::filesystem;
^~~~~~~~~~
deneme.cpp:5:31: error: expected namespace-name before ';' token
namespace fs = std::filesystem;
^
deneme.cpp: In function 'int main()':
deneme.cpp:13:26: error: 'fs' has not been declared
for (const auto& file : fs::recursive_directory_iterator(path))
^~
again same issue unfortunately
@baduymus - what version of VS are you using? You need at least VS2019. VS2022 is the current version.
For VS, Project/properties/general/C++ language standard should be at least ISO C++20 (ISO C++17 if you really want, but C++20 is the latest standard).
If you have both VS Code and VS, then IMO VS is the preferred as it is an IDE with editor, compiler, debugger etc all in-built.
VS 2019/2022/ defaults to C++14 when creating a new project/solution, you have to manually change the project's properties to use C++17/C++20/C++latest.
I recommend you purposely modify the default for new projects using the Property Manager when you have a project open. It isn't just for adding library directories, it can change the language standard and a lot more.