C++ Tutorial 17 : Sequence Containers

  Рет қаралды 25,100

Derek Banas

Derek Banas

6 жыл бұрын

Get the Code for Free : bit.ly/plusplus17
Best C++ Book : amzn.to/2rXATC9
/ derekbanas
In this part of my C++ tutorial I'll cover Sequence Containers which contain data that is stored in order. Previously I covered Vectors and will now cover Deques, Lists and Forward Lists.
I'm getting near the end of my core coverage of C++. Once I finish I will then move on to GUI development, Algorithms and all the other things that have been requested.

Пікірлер: 76
@kingsloth5073
@kingsloth5073 6 жыл бұрын
THANK YOU!I DON’T KNOW HOW I’D LIVE WITHOUT YOU
@derekbanas
@derekbanas 6 жыл бұрын
You're very kind :)
@alphabetical2671
@alphabetical2671 6 жыл бұрын
Hi Derek you are the best in the world I never miss your tutorials may god bless you keep going
@derekbanas
@derekbanas 6 жыл бұрын
Thank you very much :) May God bless you as well.
@jimrobertson6959
@jimrobertson6959 6 жыл бұрын
Hi Derek, maybe you know this or not: Netbeans allows easy movement of lines up and down the source code without having to "cut'n'Paste." On my set-up (windows) use "alt_shift_arrow_up/down." You can also move blocks of code the same way by selecting them. Another really useful trick is to use "ctrl-shift_arrow_up/down" to duplicate lines or blocks. I'm sure there are some other really useful shortcuts but these two are amongst my favorite Netbeans features.
@derekbanas
@derekbanas 6 жыл бұрын
Thank you for sharing :) Yes NetBeans is great. I didn't use a lot of shortcuts because I think a lot of people following this tutorial are using Visual Studio
@2271masoud
@2271masoud 6 жыл бұрын
I love the way you teach. Thanks Derek
@derekbanas
@derekbanas 6 жыл бұрын
Thank you very much :)
@Djzaamir
@Djzaamir 6 жыл бұрын
Thanks Derak, Great Video as always :)
@derekbanas
@derekbanas 6 жыл бұрын
Thank you :)
@ryantripi6647
@ryantripi6647 5 жыл бұрын
It's been a couple videos since I've commented, but I had to comment here to say thanks for this video that really cleared up on lists for me (always a weakness of mine). Your videos are great and helpful as always. One question I did have is more so with Netbeans than this video's content, in that more of the functions that I used for deques, lists, and forward lists had the red underline like they were errors, same with some other things like std::cout is underlined, but it never throws an error. Not a serious issue, but it does make debugging a bit more difficult.
@derekbanas
@derekbanas 5 жыл бұрын
I'm very happy to hear that my videos have helped :) Check this out for the warnings stackoverflow.com/questions/22987330/netbeans-cant-resolve-symbol-c11?rq=1
@muhammadfitrah9252
@muhammadfitrah9252 6 жыл бұрын
very excitde about gui development, thanks
@fastoon4789
@fastoon4789 6 жыл бұрын
thanx for all these videos you're making. I hope the lack of views doesn't discourage you from making more videos(I noticed u had a lot more before)
@derekbanas
@derekbanas 6 жыл бұрын
Thank you for watching them :) Don't worry. I won't stop making them because of a lack of views. Many more C++ tutorials are coming
@fastoon4789
@fastoon4789 6 жыл бұрын
I already know all of this. I just enjoy watching them and repeat what I know about C++
@exodus8814
@exodus8814 6 жыл бұрын
Thank you very much Derek :) We appreciate all the hard work:)
@derekbanas
@derekbanas 6 жыл бұрын
Thank you for watching for so long :)
@exodus8814
@exodus8814 6 жыл бұрын
Derek Banas Thank you very much Derek :) I'll keep on watching and supporting all your videos :)
@derekbanas
@derekbanas 6 жыл бұрын
You're the best :)
@exodus8814
@exodus8814 6 жыл бұрын
Derek Banas That was very kind Derek :) Thanks. Are you thinking about either making a channel for livestreams or possibly live streaming on this channnel? I miss them a lot:(
@derekbanas
@derekbanas 6 жыл бұрын
I have been working on livestreams for Japanese. The best way to learn is to converse with others and I also thought it would be fun to learn from manga and anime if I can get around copyright issues? I miss doing them as well
@RaviPrakash-tc5nw
@RaviPrakash-tc5nw 6 жыл бұрын
You are my best teacher😁😁😁😀
@derekbanas
@derekbanas 6 жыл бұрын
Thank you :) I'm very happy to be of help
@oneinabillion654
@oneinabillion654 3 жыл бұрын
Hi Derek, can you explain the difference between using emplace and pushback for beginner like me? I don't understand the explanation on the internet.
@libanabdi5337
@libanabdi5337 6 жыл бұрын
Best friend and best teacher thnks never stop your effort sir we are with you we are your support so appreciated (RAMAAN KARIIM)
@derekbanas
@derekbanas 6 жыл бұрын
Thank you for the kind message :) Many more are coming
@AndrewDChristie
@AndrewDChristie 5 жыл бұрын
Learning quickly, learning what I need for the job.
@derekbanas
@derekbanas 5 жыл бұрын
Happy to be of help :)
@arashvasheghani9613
@arashvasheghani9613 Жыл бұрын
Is there is a way to see the compile within visual studio just like how you have it in this video (right side of the screen, within the program)?
@milinkopale
@milinkopale 4 жыл бұрын
Hi Derek, thank you for this lovely tutorial. I want to asc can you make a real world project based C++ tutorial.
@derekbanas
@derekbanas 4 жыл бұрын
I'm very happy you liked it. Near the end I make GUI apps using C++ and Qt
@jonathany1240
@jonathany1240 2 жыл бұрын
What font did you use for these tutorials? the standard mono with apache netbeans doesn't distinguish very well between l and 1 which hasn't really been a problem until this tute.
@killianward9127
@killianward9127 Жыл бұрын
I think it's called Monaco
@NicoScholz90
@NicoScholz90 5 жыл бұрын
deq1.erase(deq1.end()); gives me an out of range error deq1.erase(deq1.end()-1); removes the last entry. Which makes sense because deq1.end() returns a pointer to the non-existing element after the last element of the deque. I have no idea why it works without -1 in your video :P
@alamarnissi529
@alamarnissi529 6 жыл бұрын
Very good job and thank you very much Derek
@derekbanas
@derekbanas 6 жыл бұрын
Thank you :) I'll see what I can do
@aliberro
@aliberro 6 жыл бұрын
The end is coming 🙁 but i love your c++ tutorials especially that your explaining concepts that college arent talking about.. are you going to cover everything about c++17 and before or just c++98 and some stuff from c++11
@derekbanas
@derekbanas 6 жыл бұрын
The C++ tutorials are not over, I just want to start covering other C++ topics like GUI development, algorithms, design, Arduino, etc. Sorry if that was confusing
@aliberro
@aliberro 6 жыл бұрын
Derek Banas nah its okay you know what ur doing and am still in grade 11 and i love ur videos alot
@exodus8814
@exodus8814 6 жыл бұрын
Hey Derek :) How are you? Just a question, what are some of the best influential books you've read throughout your life? They don't need to be about programming, they could be about philosophy, life, physics, nature etc... I greatly appreciate it :)
@derekbanas
@derekbanas 6 жыл бұрын
Super awesome wonderful :) Wow, I have quite the list, but I'll keep it short. Programming wise books from Martin Fowler helped me a lot. Running is my passion and it started after reading Born to Run. When I felt like nothing Unlimited Power showed me that anyone can accomplish amazing things. The fictional book Neuromancer made me love the internet before it existed. His Dark Materials is the best fictional book series I've ever read aside from Lord of the Rings (The Audio Book is Amazing!!!). Books by Sebastian Kruger influenced and made me love art. After reading at least a thousand books those are definitely at the top of the list.
@exodus8814
@exodus8814 6 жыл бұрын
Derek Banas Wow thank you very much for that wonderful list Derek:) I feel like I should read books to get an inspiration and also to get my motivation back. Sometimes I just feel I'm not smart enough to do programming, so I just end up being lost or taking a break from it. But I'll work hard as much as possible. And whoaa I'm also a big fan of Lord of the rings! Surprisingly haven't read the books yet :(
@cloudstrife7083
@cloudstrife7083 5 жыл бұрын
How good are you in C++ ? Do you consider yourself a expert or just a intermediate ? Which is your main language and what you love about it ? Do you feel C++ is a niche language theses days more for 3d games etc compared to C#, JS, JAVA etc were there is more jobs and salary job security etc etc
@derekbanas
@derekbanas 5 жыл бұрын
I can do most anything I'd like to do with C++, but since it isn't my main language everything doesn't come natural some times. C#, JS, PHP and Java are my main languages. I'd use C# to make any game (2D or 3D). The most in demand (high paying) language by far is Java. I prefer C# because I can do anything with it from desktop, mobile, web, anything. If I have to do anything low level though C++ is the way to go.
@cloudstrife7083
@cloudstrife7083 5 жыл бұрын
I wanted to get back into programming after 19 years, always was interested in 3d graphics to build 3d engine for games with Directx and Opengl but it seem very hard the 3d math and all that, game market job security etc etc compared doing "easy JS" for better jobs etc C++ sure seem to have changed a lot with Template, Auto pointers and all the new jazz it's like they trying to play catchup to C# or others modern language What do you think of WebAssembly do you believe it will catchup and be a thing 1 day or JS will remain the main language for everything webdev ?
@derekbanas
@derekbanas 5 жыл бұрын
For games I use Unity. It is super easy to make games. I have a tutorial kzbin.info/www/bejne/j5yQhGt9gLN-rq8 One of my kids favorite games is Over Cooked and it was made with unity. Game engines with C++ is a team approach. I haven't had a lot of time with WebAssembly, but it doesn't seem to be gaining steam. C# is great for making mobile apps. Java still rules when it comes to enterprise and that doesn't seem like that will change.
@mostafasaleh2806
@mostafasaleh2806 5 жыл бұрын
👏👏👏👏👏👏👏👏👏👏.... You are awesome!
@derekbanas
@derekbanas 5 жыл бұрын
Thank you very much :)
@AHMED-ry2gy
@AHMED-ry2gy 6 жыл бұрын
is there anything you aren't good at??? I susbcribed to your channel years ago and you keep amazing me with what you teach and your ability to reply to most of the comments
@derekbanas
@derekbanas 6 жыл бұрын
There is always something new to learn. Thank you for watching my videos :)
@shubhambaranwal7613
@shubhambaranwal7613 6 жыл бұрын
Thank you for this. I was hoping if you can do a cgi web development video from c++. I would really appreciate it. Although no one use it I guess.
@derekbanas
@derekbanas 6 жыл бұрын
I'm happy to help :) I plan on covering networking and socket programming. I'll just do them in a separate tutorial series
@shubhambaranwal7613
@shubhambaranwal7613 6 жыл бұрын
Ok thank-you again
@aleksandrepaksashvili6676
@aleksandrepaksashvili6676 6 жыл бұрын
what videos will you make after C++ ?
@derekbanas
@derekbanas 6 жыл бұрын
GUI development, Arduino, algorithms, etc.
@LemonChieff
@LemonChieff 6 жыл бұрын
Why do you put `return 0;` at the end of main?
@derekbanas
@derekbanas 6 жыл бұрын
That is a notification that the code executed without error
@LemonChieff
@LemonChieff 6 жыл бұрын
Ok I poorly phrased my question. It's not necessary. That's exactly what the closing bracket in the int main() function does. In the standard (cf: www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf p 62 §3.6.1) "5 A return statement in main has the effect of leaving the main function (destroying any objects with automatic storage duration) and calling std::exit with the return value as the argument. If control reaches the end of main without encountering a return statement, the effect is that of executing `return 0;` " It's also true in C: " 5.1.2.2.3 Program termination 1 If the return type of the main function is a type compatible with int, a return from the initial call to the main function is equivalent to calling the exit function with the value returned by the main function as its argument;(11) reaching the } that terminates the main function returns a value of 0. If the return type is not compatible with int, the termination status returned to the host environment is unspecified. " (cf: www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf )
@LemonChieff
@LemonChieff 6 жыл бұрын
Btw while I got your attention: ' ' and std::endl; don't have the same effect. std::endl; also flushes the stream. Therefore: ```C++ #include int main() { std::cout
@derekbanas
@derekbanas 6 жыл бұрын
Yes I know that. Thanks for the input :)
@shipilov23
@shipilov23 6 жыл бұрын
Круто)
@derekbanas
@derekbanas 6 жыл бұрын
Cпасибо)
@huyvole9724
@huyvole9724 6 жыл бұрын
Thank I need STL
@derekbanas
@derekbanas 6 жыл бұрын
I'm happy it helped :)
@bhargav7476
@bhargav7476 6 жыл бұрын
Hello sir, have you covered most of the basics of c++ yet?
@derekbanas
@derekbanas 6 жыл бұрын
Yes up next I'll finish containers and then regular expressions. That will cover well beyond the core language. Then I'll cover GUI development, Arduino, algorithms and design
@bhargav7476
@bhargav7476 6 жыл бұрын
Derek Banas first off let's appreciate that response time (4min). I am at part 3 already and loving it so far, It will help me to get better grades and I am very thankful for that. Keep up the good work man 😄
@derekbanas
@derekbanas 6 жыл бұрын
I'm very happy to be of help :)
@Adam-cn5ib
@Adam-cn5ib 6 жыл бұрын
Please don't stop making C++ videos already? :(
@derekbanas
@derekbanas 6 жыл бұрын
I'm not going to. I have a few more for this series in which I'll cover the rest of the core language. Then I'll branch into C++ GUI, networking, Arduino, algorithms, etc. Many more C++ tutorials are coming
@afshanmh
@afshanmh 5 жыл бұрын
Very basic info, not much of details, differences, emplace vs insert ...
@Alphabet_-_
@Alphabet_-_ 4 жыл бұрын
C++ Tutorial 18 : Associative Containers & Container Adapters
21:06
C++ Tutorial 13 : Advanced Functions
18:27
Derek Banas
Рет қаралды 67 М.
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 121 МЛН
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 11 МЛН
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 19 МЛН
路飞太过分了,自己游泳。#海贼王#路飞
00:28
路飞与唐舞桐
Рет қаралды 39 МЛН
C++ Tutorial 4 : Exception Handling & Looping
25:45
Derek Banas
Рет қаралды 50 М.
C++ Tutorial 15 : Smart Pointers & Polymorphic Templates
15:34
Derek Banas
Рет қаралды 37 М.
C++ Pointers - Finally Understand Pointers
15:56
Caleb Curry
Рет қаралды 210 М.
C++ Tutorial 12 : Operator Overloading & File I/O
28:30
Derek Banas
Рет қаралды 35 М.
C++ Tutorial 14 : Templates & Iterators
22:13
Derek Banas
Рет қаралды 74 М.
Stop, Intel’s Already Dead!
13:47
Linus Tech Tips
Рет қаралды 227 М.
What is the Difference Between a Pointer and a Reference C++
7:58
Paul Programming
Рет қаралды 427 М.
C++ Tutorial 9 : Lambda Expressions
25:21
Derek Banas
Рет қаралды 56 М.
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 121 МЛН