Path Composition
C++ allows us to create a path in the form of a string. Let's find out how.
We'll cover the following
We have two methods that allow to compose a path:
path::append()
- adds a path with a directory separator.path::concat()
- only adds the ‘string’ without any separator.
The functionality is also available with operators /
, /=
(append), +
and +=
(concat).
For example:
Get hands-on with 1400+ tech skills courses.