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 - Наука
🚀📈💻🔥 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
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!
it's good that we have u in programming.
tnx(heart)
Really excellent and helpful video😃
I can't understand y is this so underrated😢
Thank you for supporting it with your comment! 🥰🥰
It sounds as an amazingly good guide in fundamental data structures and a list is a king of them.
Perfect timing I’m legit learning this in my computer science class
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
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 😅😅
🚀✨️
Im struggling with DSA, which videos of her should I watch?
@@johndelmo1213 Watch her video's to learn the C++ programming language
The Problem solving and intuition thinking will come slowly as you solve DSA problems
If you want to learn to solve DSA problems then watch Striver he teaches it in C++
this is great, i'm so glad that i found your channel and your practical programming course, greetings from Iceland
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✌️🤗!!
thank you sooo much for that wonderful content
i watched your other video about lists and now i don't know which one is better, thank you Saldina :)
i love your content
i was looking for this literally 2 days ago, i need it for my exams..you are master of the timing Saldina
🥰🥰
thanks saldina ! this is good.
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
Thank you mam from India
Perfectly explained. Thank you very much for that 🙂
You're welcome 😊
great content saldina, i'm enrolled in your course too and im preparing for my finals, wish me luck :D
Love your channel, ty so much for teaching us!!
I was hoping you could make a video on prepecessor
like #inlcude, #if, #else, etc
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
Thanks, Saldana. A+++
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.
Ngl, I came here to watch you
You are stunning, not less than a actress
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
Could you create some network programming projects in c++?
when will the new detailed video of iterators coming ?
hello Saldina, question about your course, i'm really enjoying it, do you know how many hours will be there in total?
😻
When using const_iterator, should we use cbegin() instead of begin() ?
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 ...
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 ++
can we have the code of your examples
It is pinned in the comments 🤗
It would be much simpler if you used the "auto" keyword and a for range loop.
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 😊
@@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.
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 ?
It's in the very title. Wear some glasses
Beautiful girl, beautiful voice, nice explanation, beautiful code
i agree with you too
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
Saldina where are you from? Are you fluent in Russian? I want to learn to speak Russian.
When CodeBeauty OF?
Dear Soldina,create a React course for us after this.. Come on, guys, let's demand React 👏👏👏
Ew
I don't need your React.
C++ has tons of features which She can explore and teach.
for(int I =0;I
#CodeBeauty thats a great example for learning list thanks for sharing