I'm running Ubuntu 18.04 in WSL, which I use to compile my c++ programs.
I need to write a program that gets the name of all the files in a certain directory and adds them into a vector of strings. Browsing the internet I found that I can use the "filesystem" library to do this in a simple and easy way.
The problem is that whenever I try using this answer I get the error 'filesystem' has not been declared
. I suspect this happens because I may not have the filesystem library installed.
I already found a way to fix it by using experimental features and adding a flag to the compilation command, but I still wonder if there is some way to update my gcc package to one that has the library already installed.
My current gcc version is 7.5.0.
Is there a way I can do this?