STL std::forward_list | Modern Cpp Series Ep. 119

Поділитися
Вставка
  • Опубліковано 29 вер 2024

КОМЕНТАРІ • 14

  • @sambhavmishra5423
    @sambhavmishra5423 Рік тому +6

    Your consistency and dedication is amazing! Thanks a lot

    • @MikeShah
      @MikeShah  Рік тому

      Cheers, thank you for the kind words!

  • @shawnshaw9859
    @shawnshaw9859 Рік тому +3

    user entr to auto build and run on the side can save some typing

    • @MikeShah
      @MikeShah  Рік тому +2

      Agreed! ua-cam.com/video/sIrooFjM904/v-deo.html 🙂

  • @bsdooby
    @bsdooby Рік тому +1

    all list-based (dl, sl) data structures suffer from data not being local. At first sight, a dl or sl list might seem a good choice, until you begin to measure performance...

    • @MikeShah
      @MikeShah  Рік тому +1

      Always have to measure! list still could be a good structure depending on how often you modify the data structure. :)

  • @kevinzebb
    @kevinzebb Рік тому +2

    In your professional career and education, how often do you use these data structures such as fwd list? I find that I mainly use array, vector, and unordered_map.

    • @MikeShah
      @MikeShah  Рік тому +3

      I haven't seen forward_list used as much in practice, because folks will tend to just implement it from scratch. I also think part of that reason is that folks are not aware of it -- the disadvantage being that you don't get the rest of std::algorithm and the other libraries that might be nice to get for free :) The subset you mentioned (especially for games/graphics) are the 3 data structures that are the most common in my experience and own personal use.

    • @kevinzebb
      @kevinzebb Рік тому +1

      @@MikeShah I agree, std::algorithm has a lot of good stuff, been trying to make more/better use of built in functions. Liking the 30min vids, looking forward to the next one.

    • @MikeShah
      @MikeShah  Рік тому

      @@kevinzebb Cheers!

  • @Zhouri
    @Zhouri Рік тому +1

    Actually I found out that there is a method to reverse() the list, so we can easily push the number that we want at the end then reverse() it back.

    • @MikeShah
      @MikeShah  Рік тому

      Ah, I suppose there is ::reverse available 🙂

  • @norm123ism
    @norm123ism Рік тому +1

    You might have saved my uni course, gotta submit in under 24hours and was struggling before find your video. I`m pretty new to C++ as I`ve mostly used regular C only but your explanation was very clear and understandable. Thanks a lot!

    • @MikeShah
      @MikeShah  Рік тому

      Cheers, happy to help!