filmov
tv
STL sequence containers (and friends) in modern C++

Показать описание
Here we start talking about the STL (Standard Template Library) containers and some utility types that make our life easier. We also speak a bit about how to use all of them and what caveats we should be aware of.
We cover sequence containers:
- std::array
- std::vector
And some other utility containers:
- std::pair
- std::string
*Please support this course!*
- Get a FREE Audible trial here:
*Stuff I'm using*
Contents:
00:00 Intro
00:22 Disclaimer
00:55 Symbols used on slides
01:27 Introducing STL
02:13 A couple of words about containers in general
02:29 std::pair
04:54 Sequence containers
05:18 std::array
06:49 Access elements of std::array
08:27 UB when accessing elements
09:06 Small example with std::array
09:25 std::vector
10:59 Modify size of std::vector
12:51 Optimize vector resizing
13:54 Example of reserve()
14:28 Example of using std::vector
15:54 std::string
17:06 Example with std::string
18:14 Convert numbers to/from strings
19:17 Conversion examples
19:56 A couple of caveats
22:30 Aggregate initialisation
23:47 Other sequence containers
24:29 Outro
Corrections:
18:16 The string passed to std::stoi must start with a number. Otherwise, an error is thrown. So the string should be smth like "42 is a number" instead.
13:23 The end condition of the loop should use **number_of_iterations** and not **kIterNum**
We cover sequence containers:
- std::array
- std::vector
And some other utility containers:
- std::pair
- std::string
*Please support this course!*
- Get a FREE Audible trial here:
*Stuff I'm using*
Contents:
00:00 Intro
00:22 Disclaimer
00:55 Symbols used on slides
01:27 Introducing STL
02:13 A couple of words about containers in general
02:29 std::pair
04:54 Sequence containers
05:18 std::array
06:49 Access elements of std::array
08:27 UB when accessing elements
09:06 Small example with std::array
09:25 std::vector
10:59 Modify size of std::vector
12:51 Optimize vector resizing
13:54 Example of reserve()
14:28 Example of using std::vector
15:54 std::string
17:06 Example with std::string
18:14 Convert numbers to/from strings
19:17 Conversion examples
19:56 A couple of caveats
22:30 Aggregate initialisation
23:47 Other sequence containers
24:29 Outro
Corrections:
18:16 The string passed to std::stoi must start with a number. Otherwise, an error is thrown. So the string should be smth like "42 is a number" instead.
13:23 The end condition of the loop should use **number_of_iterations** and not **kIterNum**
Комментарии