June 2017
Intermediate to advanced
532 pages
12h 59m
English
In this section, we will implement a little tool that recursively iterates over a given directory. While doing that, it counts the number and size of all files, grouped by their extensions. Finally, it prints which filename extensions exist within that directory, how many there are per extension, and their average file size.
#include <iostream> #include <sstream> #include <iomanip> #include <map> #include <filesystem> using namespace std; using namespace filesystem;
static string size_string(size_t size) { stringstream ...Read now
Unlock full access