#include <fstream>
      
      fs::path p{"C:\\Windows\\System\\photo.jpg"};
      cout << "p.root_name(): " << p.root_name() << '\n';
      cout << "p.root_directory(): " << p.root_directory() << '\n';
      cout << "p.root_path(): " << p.root_path() << '\n';
      cout << "p.relative_path(): " << p.relative_path() << '\n';
      cout << "p.parent_path(): " << p.parent_path() << '\n';
      cout << "p.filename(): " << p.filename() << '\n';
      cout << "p.stem(): " << p.stem() << '\n';
      cout << "p.extension(): " << p.extension() << '\n';
      
      Cpp language logo

      Path components

      Codiga's C++ Recipes

      List parts of a path

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.