C++ List (Real examples, Sorting a list, When (not) to use List, Detailed explanation, Step-by-Step)

Поделиться
HTML-код
  • Опубликовано: 25 июн 2024
  • In this video, we are learning what are STL containers. I will teach you how to use lists in C++ with practical example. We will start with the basics of C++ lists and we will gradually move to more complex practical examples. You will learn how to create a matchmaking system that is used in many popular video games like PUBG, Warzone, Fortnite, and for that, we will use STL lists and iterators. I will also teach you the difference between lists and arrays (vectors). As part of this comparison, we will go through the main pros and cons of lists and vectors.
    This video will help you understand the purpose of lists in C++, and in upcoming videos, we will cover the rest of the STL containers.
    Additionally, if you want to gain more practical experience in building real apps and solving real problems, join my Practical Programming Course below.
    🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/
    Experience the power of practical learning, gain career-ready skills, and start building real applications!
    This is a step-by-step course designed to take you from beginner to expert in no time!
    💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10).
    Use it quickly, because it will be available for a limited time.
    📚 Learn how to solve problems and build projects with these Free E-Books ⬇️
    C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book
    Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook
    ☕ If you've found my content helpful and would like to support me, you now have the option to buy me a coffee or a cookie! It's a small gesture of gratitude that means a lot to me and helps me keep creating free educational videos for you. ❤️😇
    Use the link to make a contribution: bit.ly/CodeBeauty_BuyMeACoffee
    Related videos:
    My Practical Programming Course (Introduction) - • Learn to Code and Earn...
    C++ Linked list (custom implementation) - • Introduction to Linked...
    C++ Vector - • STL vector (Relationsh...
    C++ Arrays - • DATA STRUCTURES - How ...
    C++ STL Introduction - • C++ STL Introduction (...
    C++ Templates - • STL Templates in C++ -...
    CONTENTS:
    00:00 - What are STL Containers?
    04:11 - How to use lists in C++?
    05:03 - How to add elements to the list?
    06:20 - How to print list elements?
    10:00 - How to delete elements from the list?
    11:22 - Using a list to build a game
    12:35 - Creating a matchmaking system
    19:42 - Passing elements by value VS passing elements by reference
    21:18 - How to use const when passing elements by reference
    24:01 - How to sort data in the list
    29:01 - Pros and cons of the list
    31:59 - Example of vectors in C++
    34:00 - Lists vs vectors
    34:18 - Conclusion
    Add me on:
    Instagram 📸 - / truecodebeauty
    Twitter 🐦- / truecodebeauty
  • НаукаНаука

Комментарии • 63

  • @CodeBeauty
    @CodeBeauty  3 месяца назад +20

    🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/
    Experience the power of practical learning, gain career-ready skills, and start building real applications! This is a step-by-step course designed to take you from beginner to expert in no time!💰Use this coupon to save 10% (CODEBEAUTY_YT10).
    Use it quickly, because it will be available for a limited time.
    📚 Learn programming with these Free E-Books ⬇
    C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book
    Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook
    **************CODE FROM THE VIDEO**************
    #include
    #include
    using namespace std;
    void displayRatings(const list& playersRatings) {
    for (list::const_iterator it = playersRatings.begin(); it != playersRatings.end(); it++) {
    cout

  • @ilyaskhan-jz1bq
    @ilyaskhan-jz1bq 3 месяца назад +1

    Hey Saldina! Your videos have been a game-changer for me in learning programming. Can't wait to see what you have in store for us in your upcoming video!

  • @MohammadKarimi-ql5nt
    @MohammadKarimi-ql5nt Месяц назад

    it's good that we have u in programming.
    tnx(heart)

  • @poojaraman6663
    @poojaraman6663 17 дней назад +2

    Really excellent and helpful video😃
    I can't understand y is this so underrated😢

    • @CodeBeauty
      @CodeBeauty  17 дней назад +1

      Thank you for supporting it with your comment! 🥰🥰

  • @kamertonaudiophileplayer847
    @kamertonaudiophileplayer847 3 месяца назад

    It sounds as an amazingly good guide in fundamental data structures and a list is a king of them.

  • @Daniel_florezzz
    @Daniel_florezzz 3 месяца назад

    Perfect timing I’m legit learning this in my computer science class

  • @lulu_barcelonalulu_barcelona
    @lulu_barcelonalulu_barcelona 3 месяца назад

    i thought yout channel is the best thing ever but your course is even better..im finishing my first year at university, you helped me alot

  • @neepunpatil5201
    @neepunpatil5201 3 месяца назад +3

    From a beginner in C++ to solving 400+ DSA problems on leetcode yes that's all possible because of you 👍🏻👍🏻👍🏻 ,it wouldn't happen if I haven't learnt C++ from you 😅😅

    • @CodeBeauty
      @CodeBeauty  3 месяца назад +1

      🚀✨️

    • @johndelmo1213
      @johndelmo1213 3 месяца назад +1

      Im struggling with DSA, which videos of her should I watch?

    • @neepunpatil5201
      @neepunpatil5201 3 месяца назад

      @@johndelmo1213 Watch her video's to learn the C++ programming language

    • @neepunpatil5201
      @neepunpatil5201 3 месяца назад

      The Problem solving and intuition thinking will come slowly as you solve DSA problems

    • @neepunpatil5201
      @neepunpatil5201 3 месяца назад

      If you want to learn to solve DSA problems then watch Striver he teaches it in C++

  • @user-sw8bq1rk9c
    @user-sw8bq1rk9c 3 месяца назад

    this is great, i'm so glad that i found your channel and your practical programming course, greetings from Iceland

  • @christopherrice891
    @christopherrice891 3 месяца назад

    Oh boy😊! Waking up to another C++ coding video! Saldina keeps us on the edge of our seats and she never fails to amaze us✌️🤗!!

  • @Hello_world807
    @Hello_world807 3 месяца назад +1

    thank you sooo much for that wonderful content

  • @milkamilkica1935
    @milkamilkica1935 3 месяца назад

    i watched your other video about lists and now i don't know which one is better, thank you Saldina :)

  • @TANCEUS
    @TANCEUS 3 месяца назад +3

    i love your content

  • @hilgicamala2520
    @hilgicamala2520 3 месяца назад +1

    i was looking for this literally 2 days ago, i need it for my exams..you are master of the timing Saldina

  • @ROYALNIL_SITE
    @ROYALNIL_SITE 3 месяца назад

    thanks saldina ! this is good.

  • @codeoasis1180
    @codeoasis1180 3 месяца назад

    great video Saldina, i want to praise your Practical Course, i'm learning a lot and i'm very eager to find out what have you prepared for us next

  • @rahuljoshi5466
    @rahuljoshi5466 3 месяца назад +1

    Thank you mam from India

  • @melvinsmile27
    @melvinsmile27 2 месяца назад

    Perfectly explained. Thank you very much for that 🙂

    • @CodeBeauty
      @CodeBeauty  2 месяца назад +1

      You're welcome 😊

  • @robi23robi23
    @robi23robi23 3 месяца назад

    great content saldina, i'm enrolled in your course too and im preparing for my finals, wish me luck :D

  • @ferfykins
    @ferfykins 3 месяца назад

    Love your channel, ty so much for teaching us!!
    I was hoping you could make a video on prepecessor
    like #inlcude, #if, #else, etc

  • @hazarder-nj9lw
    @hazarder-nj9lw 3 месяца назад

    hey there..i really like your videos, so much that i enrolled your course immediately when you published it and it is great, i would highly encourage everyone to do the same

  • @rcookman
    @rcookman 3 месяца назад

    Thanks, Saldana. A+++

  • @ChrisCarlos64
    @ChrisCarlos64 3 месяца назад +1

    8:30 I was wondering is there any reason you didn't show the way to iterate over objects in the list with std::for_each or as:
    for(auto item : list)
    {
    }
    Syntax?
    I feel it would be helpful to try and teach, but I know it can also be difficult as it may introduce a new paradigm in programming, and requires knowledge that these require modern C++ features to be enabled like C++11 and the algorithm header.

  • @GSD549
    @GSD549 3 месяца назад

    Ngl, I came here to watch you
    You are stunning, not less than a actress

  • @ulrich-tonmoy
    @ulrich-tonmoy 3 месяца назад

    You should do a game dev or engine dev series where you show why we need this and that and where we shouldn't use them with real work example with project

  • @geeksuperstar8564
    @geeksuperstar8564 2 месяца назад

    Could you create some network programming projects in c++?

  • @Ayesha-ic1jn
    @Ayesha-ic1jn 3 дня назад

    when will the new detailed video of iterators coming ?

  • @gollygobih6527
    @gollygobih6527 3 месяца назад

    hello Saldina, question about your course, i'm really enjoying it, do you know how many hours will be there in total?

  • @vvkbees6473
    @vvkbees6473 3 месяца назад

    😻

  • @ali_youtube_user_7351
    @ali_youtube_user_7351 3 месяца назад

    When using const_iterator, should we use cbegin() instead of begin() ?

  • @VipulYadav-bm9kw
    @VipulYadav-bm9kw 9 дней назад

    In using constant when passing elements by reference in dev c++ the error generated on line 13 that :
    In function 'int main()':
    [Error] in c++98 'allplayers' must be initialized by constructor , not by '{....}'
    [Error] could not convert '{2,9,6,7,3,1,4,8,3,2,9}' from '' to 'std::list'
    Please give me a solution for this ...

  • @Geckoo1337
    @Geckoo1337 3 месяца назад

    List is more useful and powerful than Vector. Personally I use them if I need to sort/add/delete/invert(...) values. If you have a fixed number of values inside your container, forget it - prefering Vector which need less resources. My point of view ++

  • @sekharsam
    @sekharsam 3 месяца назад +1

    can we have the code of your examples

    • @CodeBeauty
      @CodeBeauty  3 месяца назад

      It is pinned in the comments 🤗

  • @Orionus83
    @Orionus83 3 месяца назад

    It would be much simpler if you used the "auto" keyword and a for range loop.

    • @CodeBeauty
      @CodeBeauty  3 месяца назад

      I was thinking about it, but I opted not to use auto because I'm afraid that most students will not understand what it actually does 😊

    • @Orionus83
      @Orionus83 3 месяца назад

      @@CodeBeautyTo be honest, I can't remember the last time I used iterators. I recommend mentioning this possibility in next videos. This is a much more convenient way.

  • @RamadanAtt
    @RamadanAtt 3 месяца назад

    you didn't tell the most important thing about the course that will attract learners which is the programming language used in the course. so which programming language ?

  • @luisferreira7900
    @luisferreira7900 3 месяца назад +1

    Beautiful girl, beautiful voice, nice explanation, beautiful code

  • @hattan6775
    @hattan6775 3 месяца назад

    Hello
    can you please help me
    I want the result for the area using C++
    ------------------------------
    #include
    #include
    using namespace std;
    float CircleAreaInscribedInaSquare()
    {
    float PI = 3.14, a, area;
    area = (PI * (a * a)) / 4;
    return area;
    }
    void ReadUserInput()
    {
    float a, area;
    cout > a;
    cout

  • @christopherrice891
    @christopherrice891 3 месяца назад

    Saldina where are you from? Are you fluent in Russian? I want to learn to speak Russian.

  • @JakubSK
    @JakubSK 3 месяца назад

    When CodeBeauty OF?

  • @thetaoufiq6703
    @thetaoufiq6703 3 месяца назад +1

    Dear Soldina,create a React course for us after this.. Come on, guys, let's demand React 👏👏👏

    • @user-by8fp5uw2o
      @user-by8fp5uw2o 3 месяца назад

      Ew

    • @iani_2020
      @iani_2020 3 месяца назад +1

      I don't need your React.
      C++ has tons of features which She can explore and teach.

  • @bashiraddean-mufarreh
    @bashiraddean-mufarreh 3 месяца назад

    for(int I =0;I

  • @lickguitars1276
    @lickguitars1276 3 месяца назад

    #CodeBeauty thats a great example for learning list thanks for sharing