Challenge: What's Inside a Path?
Complete this hands-on exercise to test your knowledge.
We'll cover the following
Problem Statement
Write a function listFilesAndDirectories()
that takes a string path
as input and displays the names of all the files and directories in the specified directory. Use the filesystem
library available in C++20 to list the files and directories.
Input
path
(string): The path of the directory to list the files and directories from.
Output
The function should print the names of all the files and directories in the given directory, one per line.
Get hands-on with 1400+ tech skills courses.