iterator begin() const; | (1) | (since C++17) |
iterator end() const; | (2) | (since C++17) |
end().The sequence denoted by this pair of iterators consists of the following:
(none).
(none).
#include <iostream>
#include <filesystem>
namespace fs = std::filesystem;
int main()
{
fs::path p = "C:\\users\\abcdef\\AppData\\Local\\Temp\\";
std::cout << "Examining the path " << p << " through iterators gives\n";
for(auto& e : p)
std::cout << e << '\n';
}Output:
Examining the path "C:\users\abcdef\AppData\Local\Temp\" through iterators gives "C:" "/" "users" "abcdef" "AppData" "Local" "Temp" ""
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/filesystem/path/begin