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.
@hieuhuynh23202 жыл бұрын
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.
@KnowledgeCenter2 жыл бұрын
Thanks. You are welcome to suggest topics for videos.
@mahadifamgate26863 жыл бұрын
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.
@KnowledgeCenter3 жыл бұрын
It's my pleasure
@rahuldubey654 жыл бұрын
Excellent explanation sir. u cleared all doubts by using different examples. Thanks a lot👌
@KnowledgeCenter4 жыл бұрын
👍
@javiereduardojimenezquiten27142 жыл бұрын
Awesome video, great explanation, keep the good work.
@KnowledgeCenter2 жыл бұрын
Thanks!
@jvsnyc3 жыл бұрын
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.
@RIPNANI5 ай бұрын
😅
@moisesdepaulodias79802 жыл бұрын
very good, thank you very much
@KnowledgeCenter2 жыл бұрын
Welcome.
@rickzhi5498 Жыл бұрын
Thank you very much, sir
@KnowledgeCenter Жыл бұрын
Welcome!
@jvsnyc3 жыл бұрын
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.
@RIPNANI5 ай бұрын
😅
@charansashidhar22144 жыл бұрын
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
@jvsnyc3 жыл бұрын
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.