Created
May 30, 2019 02:09
-
-
Save regehr/fdf82768f25c9b15d549dd5057be2532 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <filesystem> | |
#include <iostream> | |
namespace fs = std::filesystem; | |
using namespace std; | |
int main() { | |
fs::path aPath{"./path/to/file.txt"}; | |
cout << "Parent path: " << aPath.parent_path() << endl; | |
cout << "Filename: " << aPath.filename() << endl; | |
cout << "Extension: " << aPath.extension() << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment