Back To Basics: C++ Containers

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 พ.ค. 2024
  • Containers provided by the standard library in C++ have almost become as essential as the language keywords themselves. Storing data in the correct way will make you a fluid and stronger programmer, as you can let the containers do the hard work for you. In this video I take a really brief look at the main containers std::array, std::vector, std::list, std::deque, std::set, std::unordered_set, std::map, std::unordered_map.
    CppCast: cppcast.com/one-lone-coder/
    Patreon: / javidx9
    TH-cam: / javidx9
    / javidx9extra
    Discord: / discord
    Twitter: / javidx9
    Twitch: / javidx9
    GitHub: www.github.com/onelonecoder
    Homepage: www.onelonecoder.com
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 395

  • @javidx9
    @javidx9  3 ปีที่แล้ว +109

    I was recently pleasantly surprised to be invited to have a chat with the guys on CppCast! You can listen to how I lowered the tone in general here: cppcast.com/one-lone-coder/ A big thanks to Rob and Jason for giving me the opportunity, they were great guys and it was great fun :D

    • @xXGskillsniperXx
      @xXGskillsniperXx 3 ปีที่แล้ว +3

      My favorite c++ youtubers making a podcast == ❤️

    • @20thCB
      @20thCB 3 ปีที่แล้ว +3

      I listened to the whole thing! Congratulations on the new arrival :-)

    • @treyquattro
      @treyquattro 3 ปีที่แล้ว +3

      massive kudos! Jason is my go-to (no, not goto) resource for keeping up to date with the language. I'll check out the podcast.

    • @samuelcampbell6559
      @samuelcampbell6559 3 ปีที่แล้ว +1

      Napping is a thing, podcasts are a thing, coding is a thing and enjoying your videos is also a thing. If only there was a way I could smash all of these pursuits together... There is!

    • @jonedwards3827
      @jonedwards3827 3 ปีที่แล้ว +1

      I thought it was a great listen, both on your philosophy towards getting people into coding and very interesting generally on robot work and PhD, congrats too, much appreciated, leaning lots.

  • @anonanon3066
    @anonanon3066 3 ปีที่แล้ว +287

    One of my favourite things about your content is that you show that C++, a language generally known to be "complicated and unwieldly", can be one of the most elegant and beautiful languages out there.

    • @fastmovingvolcanomatter
      @fastmovingvolcanomatter 3 ปีที่แล้ว +37

      I don't know that "elegant" is the word I'd use to describe the language itself. I think the extreme flexibility afforded by how precise you can be in programming to your exact needs lends itself well to providing opportunities to write elegant code, but the language as a whole isn't elegant I don't think.
      Like, think about all the duplicate functionality C++ has from C backwards compatibility (mostly to do with pointer and memory management stuff). Or some of the semi-duplicate specifiers like struct and class (only difference is being private vs public by default, both of which already exist as dedicated keywords to serve this exact purpose), or typename and class in template definitions (whose few differences are slowly being removed even now). Then there's template specializations and metaprogramming as a whole, the Concepts spec being introduced in C++20, etc. It's all kind of a mess, really.

    • @x-seronis-x
      @x-seronis-x 3 ปีที่แล้ว +8

      All things possess beauty. Its a matter of having the proper perspective

    • @anonanon3066
      @anonanon3066 3 ปีที่แล้ว +17

      @@fastmovingvolcanomatter I agree. This whole template thing is one big shit show.
      You can write a function for arbitrary types, but only if you put the function body in-class.
      Oh, you want to put the code in the classes .cpp? Now you have to declare beforehand what types T should be, basically removing the point of templates...
      And now these concepts... Why couldn't I just do
      template
      T Add(T a, T b) { return a + b;}
      and the compiler would reject all instances where T does not have the dependent functions? Like, operator+...
      Why would I have to write a big mess of template requirements std::is_numeric, etc... All the information is there...

    • @RogueShadowTCN
      @RogueShadowTCN 3 ปีที่แล้ว +10

      Don't be fooled! He keeps it on the simple side on purpose!

    • @arielespindola1759
      @arielespindola1759 3 ปีที่แล้ว +6

      C++ should be used and seen as a modern language these days... and yes, it is so elegant

  • @chrisroode
    @chrisroode 3 ปีที่แล้ว +230

    I’m a completely self taught programmer, and this video did such a great job at filling in so many gaps! You are a great teacher!

    • @Meskalin_
      @Meskalin_ 3 ปีที่แล้ว +5

      same!

    • @jakubpluhacek3779
      @jakubpluhacek3779 3 ปีที่แล้ว +5

      Go do some codewars and look at people's solutions! They often use so many useful functions/objects from standard library and mostly explain why they do so.

    • @jkligel
      @jkligel 2 ปีที่แล้ว +2

      Well stated. Completely agree

    • @happygofishing
      @happygofishing 9 หลายเดือนก่อน

      Although im studying networking, ive had no programming education so this is a greatly useful channel!

  • @AMildCaseOfCovid
    @AMildCaseOfCovid 3 ปีที่แล้ว +197

    I had no idea that a vector behaved like a hermit crab searching for larger shells as it grows

    • @MMarcuzzo
      @MMarcuzzo 3 ปีที่แล้ว +1

      Me too. That was cool

    • @beskamir5977
      @beskamir5977 3 ปีที่แล้ว +2

      Same, I definitely accidentally wrote bugs where I used pointers to vectors that got resized...

    • @javidx9
      @javidx9  3 ปีที่แล้ว +111

      It gets worse... When the vector is moved, all that data is just left there, so the pointers still appear valid for a random amount of time!

    • @surters
      @surters 3 ปีที่แล้ว +4

      @@javidx9 Usually I get around it by using an index into the vector instead as iterators/references/pointers gets invalidated by relocation.

    • @nextlifeonearth
      @nextlifeonearth 3 ปีที่แล้ว +6

      @@javidx9 Sounds ideal to store passwords in for all those buffer overflow gains.

  • @NatalisYT
    @NatalisYT 3 ปีที่แล้ว +112

    You are truly one of the best teachers of programming and C++ around, we are all very fortunate to have you and I hope you continue to make beginner/intermediate videos like this to help make this nightmarish language more accessable to more people. Another great video, thank you!

    • @javidx9
      @javidx9  3 ปีที่แล้ว +29

      Thanks Natalis, I will be occasionally doing more "entry level" videos, but also some of the silly projects too :D

    • @mrgeebee1622
      @mrgeebee1622 3 ปีที่แล้ว +3

      I agree, this is really good to watch, and very pedagogic. Thank you Javidx9

  • @suicidalkids9916
    @suicidalkids9916 3 ปีที่แล้ว +41

    Only TH-camr that fully explains super boring cpp concepts and makes it fun.

    • @lozD83
      @lozD83 3 ปีที่แล้ว +10

      Or maybe "... fully explains super fun cpp concepts and doesn't make it boring"? ;)

    • @fitstrong167
      @fitstrong167 3 ปีที่แล้ว

      C++ boring ??? Wtf is wrong with you ...dam boi ...

    • @scharpmeister
      @scharpmeister 3 ปีที่แล้ว +3

      @@fitstrong167 wish I had that energy

  • @franciscogerardohernandezr4788
    @franciscogerardohernandezr4788 3 ปีที่แล้ว +18

    It's pure bliss when a pro coder goes back to explain basics. A C++20 tutorial using your pixel engine would be a beast. Regards and great work!

  • @DFPercush
    @DFPercush 3 ปีที่แล้ว +37

    Any chance of getting into the C++20 stuff with concepts, coroutines, and piping operators?

  • @saudude3209
    @saudude3209 3 ปีที่แล้ว +13

    As someone old enough to know how studying programming or just about any other science subjects looks like without youtube or udemy, I never forget to say that videos like this one and creators like you are a treasure.
    Even though I had successfully defended a cpp project for my engineering thesis, I have still remained at a cpp amateur/intermediate level, because of my laziness and lack of consistency in learning.
    I appreciate series like "Back To Basics" a lot. Thank you for providing high quality, in-depth lessons for us for free.

  • @irbaboon1979
    @irbaboon1979 3 ปีที่แล้ว +16

    I had to learn this from a rudimentary data structures book with shoddy drawings and unsatisfactory input from my teacher in the mid 90’s - your explanations are much clearer. Although I haven’t done C/Cpp for years in my professional career I’m still enjoying the content. Keep it up!

  • @pythagorasaurusrex9853
    @pythagorasaurusrex9853 3 ปีที่แล้ว +9

    I watched a lot of your c++ videos so far. I have to say: Great job. I learned C++ way back in early 90ies but stopped programming about 20 years ago. Now I started to dig out my old C++ knowledge and re-learn C++ and I see how much C++ has evolved the last 20 years with all those new std:: features. Keep up your quality!

  • @nuderedfinger
    @nuderedfinger 3 ปีที่แล้ว +2

    God bless you dude!! I really needed a good video on STL containers, and upon searching "C++ containers", your video was the top result! I actually started learning C++ from your channel a few years ago. Absolutely, the best C++ channel on TH-cam. Thank you for what you do :) I hope to support you someday in a bigger/better way than just likes and comments haha

  • @TheButcher58
    @TheButcher58 3 ปีที่แล้ว +1

    Your videos are really helpful in the sense that they do not provide a basic step by step tutorial how to implement a vector for example, but rather explain the background processes so that you understand why/when to choose a certain container type. I also like the fact that your video subjects are not necessarily related to each other but you pick a certain topic each time. This way you learn a lot of different things each video. Thank you for all the content you provide!

  • @Thinzy
    @Thinzy 3 ปีที่แล้ว +9

    thank you so much for what you've provided us all with. Your explanations make everything so simple to understand

  • @firepro20
    @firepro20 3 ปีที่แล้ว +1

    I'm just getting started in C++ and your calm approach encourages me to learn more and not be afraid of the most complex / unforgiving programming language. Thank you and please continue making more videos! :D

  • @davideriemma180
    @davideriemma180 3 ปีที่แล้ว +1

    The timing of this video is perfect: right when i needed. i feel like this is one of the channel that covers C++ and algorithm on a very detailed and easy to understand way! Thank you so much!

  • @burntt999
    @burntt999 2 ปีที่แล้ว +1

    !!! javid you really are the man!!!! I always wanted to write something like this program in the video but wasn’t sure how to go about it. Now I can go over the program you wrote on this video line by line until I have it ingrained in memory.. jeez this channel is so incredible.

  • @JoshRosario310
    @JoshRosario310 3 ปีที่แล้ว +2

    This is great, I learned C++ in 2005 and never touched it again until 15 years later. I never got into templates and with these containers there was a lot of syntax that made it look to me like a completely different language. I've been trying to find exactly this video with no real luck.
    I recently learned PHP and VB and thought the concept of a for..each was pretty nifty and wished I knew of a way in C++ back in the day!
    Great videos, I've been bingeing your content from the beginning over the last month.

  • @markrobinson2648
    @markrobinson2648 3 ปีที่แล้ว +1

    I'm a C# developer who is learning C++ and your videos (particularly this one) are fantastic. Thank you for spending the time to create the videos.

  • @leanderperera8467
    @leanderperera8467 ปีที่แล้ว

    Excellent overview of C++ containers and their internals and efficiency. Thank you.

  • @ZeroCool2211
    @ZeroCool2211 3 ปีที่แล้ว +14

    Man that's exactly what I need currently 👌🏼

  • @thalescarl1589
    @thalescarl1589 3 ปีที่แล้ว

    Awesome video. I don't think we can find other content with this much quality on TH-cam. Please make this a series explaining the basics for us.

  • @jaitjacob
    @jaitjacob ปีที่แล้ว

    thank you for making such a comprehensive yet easy to understand video! you are a great teacher.

  • @proud22beme
    @proud22beme 3 ปีที่แล้ว

    this video is a godsend! i am self taught, so there is some knowledge gaps, prior to this i have mainly paid attention to time complexity, but the way you explain the memory allocation for each container is so good in this! learned a ton from it

  • @neefofway8746
    @neefofway8746 2 ปีที่แล้ว

    I appreciate what you do Javid, I owe everything I know about c++ and programming in general to you. Keep it up brother!

  • @chiefthebeast9343
    @chiefthebeast9343 3 ปีที่แล้ว +1

    Thank you so much! I am teaching myself c++ and I am at vectors and you explained everything I am learning about in this one video!

  • @xit1254
    @xit1254 3 ปีที่แล้ว +1

    This is the best explanation of these mysterious C++ containers I've run across. I now believe I actually understand them.

  • @mehtubbhai9709
    @mehtubbhai9709 8 หลายเดือนก่อน

    Loved your explanation on this topic. Please do more C++ back to basics videos. Good teachers like you are much appreciated. Cheers!

  • @CodingCardSharp
    @CodingCardSharp 3 ปีที่แล้ว +1

    Thank you for uploading this; it's a really useful resource on my own learning journey! I started C++ from scratch on a part-time basis in Sept 2020, and have basically been beasting arrays (of the 1D and multi-dimensional variety), loops, basic recursion, and some very simple classes/structs since. It was a linear learning process, including working out the 'easier' problem solving exercises. However, the next step up demands more...I dipped my toe in the murky waters of STL, and had it bitten off by some of the coding problems that demand their usage; so it's great to see the containers explained in a manner that sticks ice-cubes down the back of the learning fatigue that had set in. Your channel does for complicated programming concepts what something like 'Grokking Algorithms' did very for the far more elementary.

  • @mokoko02
    @mokoko02 2 ปีที่แล้ว +2

    Hey just wanted to thank you for explaining these basic concepts in a ...well basic manner :) A lot of people online try to over-complicate things so your style of teaching helps me a lot.

    • @javidx9
      @javidx9  2 ปีที่แล้ว

      Hey my pleasure buddy!

  • @danieloliveira9815
    @danieloliveira9815 3 ปีที่แล้ว +3

    Im a junior web dev and I don't understand most of your videos, but still I don't miss one because the way you explain is so entertaining :D

  • @NormHen5413
    @NormHen5413 3 ปีที่แล้ว

    These beginner level concepts are super helpful, thanks for posting Javid

  • @abhiz93
    @abhiz93 3 ปีที่แล้ว +1

    I had to learn vectors when I started to prepare for interviews. Even the most basic questions couldn't be done without vectors on HackerRank. Thanks for this primer! Much appreciated.

  • @magisteriumemporium1411
    @magisteriumemporium1411 3 ปีที่แล้ว +1

    Mr. Beautiful beard man strikes my heart again>
    THANK YOU FOR THIS.
    You are in my opinion one of the best, if not the best, people out there for content to watch. Thank you so much for what you have done for the community

  • @felixmerz6229
    @felixmerz6229 3 ปีที่แล้ว +6

    This video is such a useful ressource. Immediate classic.

  • @scharpmeister
    @scharpmeister 3 ปีที่แล้ว

    Amazing. In the midst of losing my mind debugging this vector indexing problem, this just pops up in my recommendations👌🏻

  • @brucewayne2480
    @brucewayne2480 3 ปีที่แล้ว

    Great video ! I studied C++ a little bit at university and now I'm using javascript and typescript. Back to the basics is essential.

  • @77Zamien
    @77Zamien 2 ปีที่แล้ว

    Great content! I have been learning C++ for a while and this was an excelent summary of the containers!

  • @robwatson826
    @robwatson826 3 ปีที่แล้ว

    That was a really interesting video and great to get some deeper understanding on how these data structures store their values, thanks for sharing!

  • @ArisAlamanos
    @ArisAlamanos 3 ปีที่แล้ว +1

    Yet another great video from an excellent channel! I admire your dedication and passion. Keep up the good work!

    • @nunyobiznez875
      @nunyobiznez875 3 ปีที่แล้ว

      Code::Blocks is fairly easy to setup and supports different compilers. It's a good IDE, and it also has tools for wxWidgets as well, which may also come in handy for you at some point as well.

  • @seanmenzies1986
    @seanmenzies1986 2 ปีที่แล้ว

    Fantastic video. "A deque is like a linked list of arrays". Light bulb moment! Thank you so much!

  • @inlandchris1
    @inlandchris1 ปีที่แล้ว

    Very good instructions. I use to hand make Link List in the mid 1990's and considered them extremely fast. Now, looks like all the hard work is pre-made making C++ a higher level programming language. I am very late as COVID delayed my programming works as I went to build some muscles instead. Thank you for this and look forward following you.

  • @yusufklc7821
    @yusufklc7821 3 ปีที่แล้ว +16

    A new video about fundamentals. Thx javidx!

  • @archie9500
    @archie9500 3 ปีที่แล้ว +3

    Just what I needed when messing around with maps of bucketed linked lists!

  • @arielespindola1759
    @arielespindola1759 3 ปีที่แล้ว +21

    It was posted four minutes ago, I haven’t watched it, and I already liked it!

    • @peter881
      @peter881 3 ปีที่แล้ว +3

      My respect for people who disliked📉

  • @arnocr01
    @arnocr01 ปีที่แล้ว

    more back to basics please! you explain things so well. i wish i had your videos back in college instead of a dry textbook.

  • @jorgeferreira6727
    @jorgeferreira6727 3 ปีที่แล้ว

    The "vector" took me by surprise. I really didn't expect it to be moving around so soon.
    I was watching just to review, as in "dusting out", some concepts, and maybe catching up with something new from the more recent C++ standards, and got kicked in the back by that old std::vector.
    Thank you for the inside details you show in your videos. After 30+ years there is still something to be learned.

    • @bumbarabun
      @bumbarabun 2 ปีที่แล้ว

      "I really didn't expect it to be moving around so soon." it is under your control, if you know in advance there would be much more elements - reserve capacity and it will not reallocate.

  • @Finkelfunk
    @Finkelfunk ปีที่แล้ว

    Can I just say that you are doing a fantastic job teaching these types of complex concepts? :)

  • @computerprogrammer7942
    @computerprogrammer7942 3 ปีที่แล้ว

    He made this video at the right time when everybody needed it, what a genius!

  • @thebasicmaterialsproject1892
    @thebasicmaterialsproject1892 3 ปีที่แล้ว

    Nothing better than a bit of back to basics

  • @Windeycastle
    @Windeycastle ปีที่แล้ว

    This was a great video! As a beginner, I've wondered how you should store multiple values in one variable. In Python, it's easy, but in C++ you have to choose what types fits your needs. I like it!

  • @Djinn667
    @Djinn667 2 ปีที่แล้ว

    This was an amazing lecture! Keep up the good work!

  • @BenKadel
    @BenKadel 3 ปีที่แล้ว

    Absolutely epic and brilliantly informative video! Thank you so much!

  • @n0handles
    @n0handles 3 ปีที่แล้ว

    This also was a great review on data structures. Thanks for another great video!

  • @doriancorr
    @doriancorr 7 หลายเดือนก่อน +1

    I've been a professional developer since the eighties. Your videos are all top notch. Kudos and I'm already a subscriber but I would have signed up with this one as well.
    Well done!

    • @javidx9
      @javidx9  7 หลายเดือนก่อน

      Thanks Dorian!

  • @geraltt1455
    @geraltt1455 3 ปีที่แล้ว +1

    like your videos, they have philosophical atmosphere

  • @brendinventer6407
    @brendinventer6407 3 ปีที่แล้ว

    You really need to make a C++ game development course. Your teaching approach is so so good. Thank you!

  • @jgurtz
    @jgurtz 3 ปีที่แล้ว

    Thanks for the great introduction to some standard containers!

  • @benjamink
    @benjamink 3 ปีที่แล้ว +1

    I program in C and hate C++ because it's so complex and has tons of features to learn, but I think after watching this video that it is actually possible. Great explanation and thanks

  • @acho8387
    @acho8387 3 ปีที่แล้ว +1

    I'm loving this! Many thanks!

  • @Artintrex
    @Artintrex 3 ปีที่แล้ว +1

    I already have a good understanding of stl library but still this is the best explanation I've seen so far. Can't help but feel jealous of people learning them from you for the first time.
    Though I still prefer vector over deque; you can allocate a larger vector beforehand which also causes vector to grow by larger steps, also removing elements by moving the last element to the middle and doing a pop back solves the performance issue. Another tip is these containers do not automatically shrink, so a vector is pretty much just as fast as a regular array as long as you don't cause it to grow again.

  • @andrewphi4958
    @andrewphi4958 2 ปีที่แล้ว

    Wow! Your speech pace and tone are just great and reminded me of techmoan so much! ))

  • @happyredmapleleaf
    @happyredmapleleaf 3 ปีที่แล้ว +21

    Let’s goooo another video for my skill level XD

  • @KingGrio
    @KingGrio 3 ปีที่แล้ว

    Thanks ever so much Javid for this video. I have not been properly trained in C++ and I find a lot of TH-cam tutorials provide contrived examples that do not really help understand when something is useful. Your videos always provide some context and I always feel like I got a clearer picture of how things work internally and what is and isn't good practice. Although because of my lack of knowledge it does take me a long time viewing your different videos to process all the information and finally "get it".
    If you ever have some time, I would be tremendously happy if you could break down the VST plugin framework for us. I have a lot of trouble understanding things like "extern C", or how virtual classes are used for versioning or inheritance, or how threads are started somewhere and how/where you should write code to pass your audio data to the plugin and so on.

  • @liamsmith7052
    @liamsmith7052 3 ปีที่แล้ว

    For me as a .NET developer switching to RAII C family your tutorials are very helpful. Thanks a lot)

  • @donnyp
    @donnyp ปีที่แล้ว +1

    Clear and precise, thank you sir

  • @tezza48
    @tezza48 3 ปีที่แล้ว +2

    Fantastic video Javid :) I always pick up a few gems i didn't know!

    • @javidx9
      @javidx9  3 ปีที่แล้ว +1

      Thanks Tezza!

  • @lercenico8260
    @lercenico8260 2 ปีที่แล้ว +1

    congrats on 256k subscribers ✌️

  • @jacopopecchini2267
    @jacopopecchini2267 ปีที่แล้ว

    THank you! this helped a lot understanding containers. I would also print che container's capacity, because for vectors it is interesting to see how it doubles every time the size hits the capacity limit.

    • @javidx9
      @javidx9  ปีที่แล้ว

      Thanks, doubling is just one strategy that empirically turns out to be reasonably efficient. Different implementations may not always double.

  • @kevinz1991
    @kevinz1991 3 ปีที่แล้ว +3

    I appreciate that JAVID9X doesn’t like to “patronize” those who learn from him and appreciate how he empowers the coder to think about how the program runs for him or herself.
    With that being said... these “Back to basic” videos... especially the pointers tutorial and this containers tutorial... are extremely helpful in understanding even the most basic games on OLC if you are not a C++ wizard. I would highly recommend anyone reading this comment to go watch how the Tetris game is made and how the Tetris blocks are indexed. It makes even some of the most sophisticated games on OLC make sense to me. Anyways hope this helps someone cause I was really frustrated at first trying to learn this stuff, thank you so much javid9x

    • @javidx9
      @javidx9  3 ปีที่แล้ว +1

      It's so important to learn how to debug, and the only way to do that is developing an understanding of what goes on behind the scenes. Digging yourself out of a hole is a really important programming skill.

  • @Danieldrd
    @Danieldrd 3 ปีที่แล้ว

    Fantastic video. Very informative, thank you!

  • @OEFarredondo
    @OEFarredondo 3 ปีที่แล้ว

    Bro, thank you. I appreciate your time and effort.

  • @silverhoof1027
    @silverhoof1027 3 ปีที่แล้ว +2

    love your work

  • @TankorSmash
    @TankorSmash 3 ปีที่แล้ว +4

    14:15 to everyone wondering, he called his vector, container not the other way around. Threw me for a loop for a sec

  • @MrSebaleme
    @MrSebaleme 2 ปีที่แล้ว

    Very efficient and video. Thank you so much!!

  • @rohanchavan5778
    @rohanchavan5778 3 ปีที่แล้ว

    Thank you for the video...hope to see more from you!

  • @anonanon3066
    @anonanon3066 3 ปีที่แล้ว +4

    Thanks for providing this information for free!

  • @cheaterman49
    @cheaterman49 3 ปีที่แล้ว +1

    I'm only 10 mins in and already love the primer on modern C++, hahaha! So many things one doesn't know when they only learned C++98 :-)

  • @GrandNebSmada
    @GrandNebSmada 3 ปีที่แล้ว

    Every time you have the idea to do a video like this, you should do it 1 week earlier, because we literally just went over linked lists in my CS class and this would have been really great to watch ahead of time haha. Great video as always!!

  • @dempa3
    @dempa3 3 ปีที่แล้ว

    Thank you for another interesting video! I'd be really interested in more videos on proceduraly generated content and especially on how to "save" the users interactions with the proceduraly generated content. And to go even further it would be very interesting to know if one could proceduraly generate agents, besides the user, who interact with each other and the rest of the content independently of the user, as well as with the user.

  • @gurnoorsingh8557
    @gurnoorsingh8557 5 หลายเดือนก่อน

    Man you did really great , understood everything

  • @reisvc
    @reisvc 3 ปีที่แล้ว

    CppCast?! Great crossover! I’m going to check that in 31’41”!

  • @davidjulitz7446
    @davidjulitz7446 ปีที่แล้ว

    In the "good old days", we implemented those containers by ourselves and often enough ended up in a mess. Good that modern C++ changed this. On the other hand to reinvent those containers might help to learn some bits. However, nice and helpful video.

  • @anouarbagent2511
    @anouarbagent2511 3 ปีที่แล้ว

    this is one the those channels that you automatically leave a like in any of its videos without even thinking.

  • @H3liosphan
    @H3liosphan 3 ปีที่แล้ว

    This is great. Thanks! I 'learned' C++ in the mid 90s, pretty sure std::array, std::vector and std::deque weren't around then! Amazing modern improvements. mostly I used standard C and more lately C#, which appears to have many similarities to this, but I'd imagine is burdened more by MS and .NET added latencies. There's a reason the Unreal Engine was built in C++.

  • @gopalsv5230
    @gopalsv5230 8 หลายเดือนก่อน

    Very fruitful info of roots and well compared between each container very precisely. 👍😍💕💕💕👌

  • @thomasjefferson6225
    @thomasjefferson6225 ปีที่แล้ว

    coming from python, and starting to learn c++.... this video made so much sense.

  • @aaaaanh
    @aaaaanh 3 ปีที่แล้ว

    Thanks so much for the review session :D

  • @GEKKOGAMES_RETRO
    @GEKKOGAMES_RETRO 3 ปีที่แล้ว +1

    great as always !! 👊🏻

  • @drewprof
    @drewprof 3 ปีที่แล้ว +2

    Good review!

  • @ZizoAhmed
    @ZizoAhmed 2 ปีที่แล้ว +1

    Finally a video I can complete on this channel . xD

  • @uzkjhgfdsewr
    @uzkjhgfdsewr 3 ปีที่แล้ว +1

    What I'm learning here is less of STL-containers having weird consequences, I'm learning about pointers having weird consequences (so you should use them only if needed and only if encapsulatable).

  • @gilleswalther5964
    @gilleswalther5964 3 ปีที่แล้ว

    I don't know why these video are making me happy :-)

  • @manuelnovella39
    @manuelnovella39 3 ปีที่แล้ว

    Wow! I loved your video, really. Donald Knuth would be pretty happy, I think. More on data structures, please? Maybe going in depth on the use of sets and maps or covering trees and graphs? That'd be awesome. In my opinion, trees deserve a whole separate video

  • @iltrovatoremanrico
    @iltrovatoremanrico 3 ปีที่แล้ว +1

    Thank you for this video!

  • @justasydefix6251
    @justasydefix6251 3 ปีที่แล้ว

    These videos are too precious! we must copy them into a vector.

  • @user-jg7xr9rz2j
    @user-jg7xr9rz2j 3 ปีที่แล้ว

    I don’t even program in C++ but I watch all your videos because they are great

  • @messij
    @messij 3 ปีที่แล้ว

    Thx for that, your my C++ hero !!

  • @foxvulpes8245
    @foxvulpes8245 3 ปีที่แล้ว

    Clear and concise! I've been using the wrong data structures ; ;

  • @durrcodurr
    @durrcodurr 3 หลายเดือนก่อน

    What std::vector does, can easily be found out by reading its source code. Many implementations by default reallocate the vector for every element added at the end of the vector. The solution for this is to create your own vector scaling policy (for instance, automatic exponential scaling). This is done by using the capacity() and reserve() methods of the vector class. Since many programmers are oblivious to this, improperly written C++ code using the vector class can get really slow. Apparently, modern implementations (like for C++20) now finally use at least quadratic exponentiation when scaling up vectors.