Vector | C++ STL (Standard Template Library) | std::vector

  Рет қаралды 16,334

Knowledge Center

Knowledge Center

Күн бұрын

Пікірлер: 19
@ayyappahemanth7134
@ayyappahemanth7134 4 жыл бұрын
I'm purely a python programmer. Now I can see that c++ was also easy to learn after that. Please do more and more I am willing to learn after watching this video.
@hieuhuynh2320
@hieuhuynh2320 2 жыл бұрын
This course is really detail and easy to understand. Hope Knowledge Center channel will have more useful video with excellent explanation like this. Thank you so much.
@KnowledgeCenter
@KnowledgeCenter 2 жыл бұрын
Thanks. You are welcome to suggest topics for videos.
@mahadifamgate2686
@mahadifamgate2686 3 жыл бұрын
i found very helpful, i tried books for STL , felt difficult there,,,, your representation is easy,,, a very good chanel i just found.... many thank you.
@KnowledgeCenter
@KnowledgeCenter 3 жыл бұрын
It's my pleasure
@rahuldubey65
@rahuldubey65 4 жыл бұрын
Excellent explanation sir. u cleared all doubts by using different examples. Thanks a lot👌
@KnowledgeCenter
@KnowledgeCenter 4 жыл бұрын
👍
@javiereduardojimenezquiten2714
@javiereduardojimenezquiten2714 2 жыл бұрын
Awesome video, great explanation, keep the good work.
@KnowledgeCenter
@KnowledgeCenter 2 жыл бұрын
Thanks!
@jvsnyc
@jvsnyc 3 жыл бұрын
I've seen people attacking C++ as unsafe, because [] without range check can cause Undefined Behavior. Well, that is why you have the option to use at(). If you use the very easy syntax of [ ] for indexing, you had best be sure that your index is valid, if you switch to using at() you could instead catch the out_of_range exception, for instance, if you are *almost sure* that your index is good, but don't want to chance the dreaded Undefined Behavior. Also, note that calling front() or back() on an empty vector also strays into Undefined Behavior. So...don't do that.
@RIPNANI
@RIPNANI 5 ай бұрын
😅
@moisesdepaulodias7980
@moisesdepaulodias7980 2 жыл бұрын
very good, thank you very much
@KnowledgeCenter
@KnowledgeCenter 2 жыл бұрын
Welcome.
@rickzhi5498
@rickzhi5498 Жыл бұрын
Thank you very much, sir
@KnowledgeCenter
@KnowledgeCenter Жыл бұрын
Welcome!
@jvsnyc
@jvsnyc 3 жыл бұрын
When checking if empty() or not, it is an optimization with many containers to call that instead of comparing size() to 0, because they may not know their size at all times, and might go thru a lot of work to find out the size is, say, 1'000'000, when empty() would return false as soon as it sees there is even 1 element in that container. I don't think it makes much difference for vector, but shows your intent.
@RIPNANI
@RIPNANI 5 ай бұрын
😅
@charansashidhar2214
@charansashidhar2214 4 жыл бұрын
what if i erase one of the element does it resize back or does it stay in the previous size lets say size is 3 before erase and after erase does it change
@jvsnyc
@jvsnyc 3 жыл бұрын
For erase(), the size always definitely goes down, the capacity will not. If you want to reclaim the space you can request a shrink_to_fit() for the vector. For clear(), the size goes to zero, but again, it doesn't touch the capacity unless you specifically request that afterwards.
List | C++ STL (Standard Template Library) | std::list
24:19
Knowledge Center
Рет қаралды 19 М.
C++ STL: Vector vs List
20:09
Creel
Рет қаралды 48 М.
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
Containers C++ | C++ STL (Standard Template Library)
14:47
Knowledge Center
Рет қаралды 40 М.
Iterator Invalidation | C++ STL (Standard Template Library)
8:58
Knowledge Center
Рет қаралды 10 М.
Map | C++ STL (Standard Template Library) | std::map
23:00
Knowledge Center
Рет қаралды 9 М.
Learn C++ With Me #18 - Vectors
13:05
Tech With Tim
Рет қаралды 164 М.
Set | C++ STL (Standard Template Library) | std::set 🔥
24:10
Knowledge Center
Рет қаралды 11 М.
Understanding C++ Vector (Dynamic Arrays)
1:14:34
pikuma
Рет қаралды 24 М.
Complete C++ STL in 1 Video | Time Complexity and Notes
1:07:37
take U forward
Рет қаралды 1,3 МЛН
ITERATORS in C++
17:09
The Cherno
Рет қаралды 217 М.
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН