WEBVTT

00:01.060 --> 00:06.550
Cplusplus programming has another powerful feature regarding the use of the template classes, which

00:06.550 --> 00:09.530
is a standard template library.

00:09.580 --> 00:10.750
S.

00:11.140 --> 00:12.040
T.

00:12.670 --> 00:13.360
L.

00:15.600 --> 00:24.240
So it's a set of class templates to provide all functions that are commonly used in manipulating various

00:24.240 --> 00:25.410
data structures.

00:25.410 --> 00:33.600
So there are four components that build the STL, the that they are first, they are algorithms, then

00:33.600 --> 00:35.850
there are containers.

00:37.420 --> 00:38.830
Iterators.

00:39.900 --> 00:41.640
And functions.

00:43.340 --> 00:45.230
Here are the algorithms.

00:46.150 --> 00:52.120
Containers, iterators and functions.

00:53.390 --> 00:55.880
So now let's look at these components.

00:55.880 --> 00:56.480
Mergers.

00:56.480 --> 00:59.510
So algorithms here, let me take this.

00:59.510 --> 01:08.480
So algorithms here are used on a range of elements such as sorting and searching.

01:08.480 --> 01:15.350
So the sorting algorithm is used to arrange the elements so both in ascending and descending order.

01:15.350 --> 01:21.650
So the searching algorithm is used to look for specific value from ranges of elements.

01:22.100 --> 01:25.250
Also we have the containers here.

01:26.670 --> 01:31.560
The containers are used to store objects of data.

01:31.560 --> 01:34.640
So the common container that is widely used is vector.

01:34.650 --> 01:42.600
So the vector is similar to an array, except it has the ability to resize itself automatically when

01:42.600 --> 01:46.290
an element is inserted or deleted.

01:46.440 --> 01:50.970
So we also have the iterators here.

01:52.340 --> 01:57.260
Iterators are used to work upon a sequence of values.

01:57.260 --> 01:59.600
So each container has its own iterator.

01:59.600 --> 02:02.240
For instance, there are begin.

02:04.860 --> 02:06.060
Uh, or here.

02:06.060 --> 02:07.980
This is the function begin function.

02:08.280 --> 02:09.390
And here.

02:11.120 --> 02:18.030
We also have the rent, which you will learn all about them.

02:18.050 --> 02:20.450
This is also our rent here.

02:20.450 --> 02:29.930
So they are the iterator functions and you will learn about them in this section.

02:30.050 --> 02:33.110
We also have the functions.

02:33.440 --> 02:39.230
Lastly here, let's actually delete this and drive on the function here.

02:39.590 --> 02:42.260
So the functions.

02:44.440 --> 02:45.340
Functions.

02:45.550 --> 02:51.490
So functions here are used to overload the existing function.

02:51.490 --> 02:56.800
So the instance of this component is called the Functor func.

02:59.070 --> 03:02.250
Functor or function object.

03:02.250 --> 03:09.120
So the functor is defined as a pointer of function where we can parameterize the existing function.

03:09.120 --> 03:16.110
So we are not building any code in this lecture since we just need to know that the STL is a powerful

03:16.110 --> 03:19.440
library in C plus plus and that it exists fortunately.

03:19.440 --> 03:26.640
So we are going to discuss the STL deeper in the next lectures.
