更新时间:2023-02-22 18:22:19
似乎您必须包含< filesystem>
像这样:
It seems you have to include <filesystem>
like this:
#include <experimental/filesystem>
别忘了添加 -lstdc ++ fs
作为GCC标志!
Don't forget to add -lstdc++fs
as a GCC flag!
这里是证据:
花木
如果这不起作用,则可能意味着您没有文件系统
。
If that doesn't work, then that probably means that you don't have filesystem
in your configuration.
另外,如@MartinR。指出,在GCC 8+中不再需要 实验性
。
Also, as @MartinR. pointed out, the experimental
is no longer needed in GCC 8+.