5,337
edits
(→Path) |
|||
Line 92: | Line 92: | ||
Convenient functions for filesystem. Added since C++17. | Convenient functions for filesystem. Added since C++17. | ||
====Path==== | ====Path==== | ||
[https://en.cppreference.com/w/cpp/filesystem/path cppreference]<br> | |||
Note if you use g++ <= version 9, you will need to add the flag <code>-lstdc++fs</code>.<br> | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// Append to path | |||
path("foo") / "bar"; // "foo/bar" | |||
path("foo") / "/bar"; // "/bar" | |||
</syntaxhighlight> | </syntaxhighlight> | ||