ITERATORS in C++

preview_player
Показать описание


This video was sponsored by Skillshare.
Рекомендации по теме
Комментарии
Автор

University: "As a CS student you will always have to learn the newest technologies."
Also university: "Yea you gonna use c++-98, cause thats what the professor learned back in the day and he never bothered to update his lecture for 20 years."

admiralspyro
Автор

Love how he mentioned university using c++ 2003 but I was using c++ 98 in my university and i graduated last year.

corbinlenning
Автор

I was recently given a C++ assessment for C++03, this was the first time a company interviewed me for such an old version. Seems like certain companies still have 20 years to catch up.

saraswathishanmugamoorthy
Автор

As a JS developer learning C++, seeing the structured binding at the end made me smile. It literally looks the same, and in JS is called destructuring. Nice video

magicweaponr
Автор

you make my self taught journey of c++ so much easier. Thank you so much

mattshu
Автор

Another good reason to use iterators in basic data structures (that you could access by an index) is to have iterators with different behaviors e.g. a reverse iterator (trivial), an iterator that gives you the next random element or that accesses the elements in a specific order or that applies some filter function.

sebastianzander
Автор

Note that the example with structured bindings will copy the elements. To iterate over a reference to the elements use:
for (auto& [key, value] : map)

MichaelYoussry
Автор

absolutely amazing video. Each video of yours make me love the language even more. I use it a lot in embedded systems and they way C++ elegantly interfaces with the hardware is simply beatiful .

practicalsoftwaremarcus
Автор

Additionally, would be really useful to mention about the usage of the reference '&' for the iterator it self. I.e. instead of using "for (auto kv : map)" - using "for (const auto& kv : map)" would eliminate unnecessary copies when iterating.

rawgame
Автор

This is one of the best explanations of iterators I have seen, I was banging my head around google for so long! thanks

Rahulsharma-rgce
Автор

Just started my journey of c++ by your playlist....am really really excited 😃

sahilaujla
Автор

You teach soo much clearly and go just one step deeper

irfanjames
Автор

Me : What are iterators ?
Cherno: Iterators are used to iterate .



Cherno: Sometimes my genius is its almost frightening

ebukaezike
Автор

Great! I was waiting for a good tutorial on this. Thanks Cherno.

rishitsingh
Автор

Thanks a lot. I really like the way you explain the iterators. The examples are simple and clear.

harounlouati
Автор

I feel kinda smug that my uni has made it all the way to C++ 11.

not_ever
Автор

This video is crafted overly well and i love it. Thank you for the thorough explanation of iterators.

raulyjimenez
Автор

Brilliant tutorial on iterators, Cherno. Always good to have such refreshers!

nextrie
Автор

Another excellent video! I wish I had these when I was learning this stuff. Even though most of these are not new to me I never miss a single c++ series video because they are so well done. Keep it up!

aqezzz
Автор

Thank you for clarifying this, which helped me make sense of it right away: Iterators appeared in the language because not all collections can be iterated over by an index.

cliffmathew