Practice
Compete
Contribute
Learn
Log In
Sign Up
Modern C++ idoms and recipes
meshell
12K views
01
Welcome
02
Structured Bindings
03
Init statement for if/switch
04
Structured Bindings & Init statement (Solution)
05
Optional
06
Optional (Solution)
07
Variant
08
Variant (Solution)
09
Any
10
Any (Solution)
11
Time Intervals
12
Time Intervals (Solution)
13
Regular Expressions
14
Regular Expressions (Solution)
15
std::vector operations
16
insert_sorted
17
Filesystem library
18
Filesystem library (Solution)
19
Pseudo-random number generation
18/19
Filesystem library (Solution)
Previous:
Filesystem library
Next:
Pseudo-random number generation
Filesystem library
Possible solution
A possible solution
1
2
3
4
5
6
7
8
9
10
#include <experimental/filesystem>
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
namespace fs = std::experimental::filesystem;
using namespace std::string_literals;
/**
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Run
0
0
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
Suggested playgrounds
c++17 std::optional
By
Shaju
8,731
1
Mission Impossible / How to create datatypes which cannot contain invalid state
By
adrianimboden
1,049
2
Computing with Data
By
elgeish
60.6K
20
Word Count in Code
By
joboc
2,568
11
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants
Keyboard Shortcuts:
?
Show / hide this help menu
×