Тёмный

STL std::map | Modern Cpp Series Ep. 126 

Mike Shah
Подписаться 22 тыс.
Просмотров 3,6 тыс.
50% 1

Опубликовано:

 

11 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 34   
@willadem8643
@willadem8643 7 месяцев назад
Man, you are criminally underrated. Wishing you a lot of success.
@MikeShah
@MikeShah 7 месяцев назад
Thanks for the kind words 🙂 The views will come 🙏
@nicolaschan3335
@nicolaschan3335 8 месяцев назад
I'm going through the STL series rn and I just wanted to say thanks, these videos are super helpful!!
@MikeShah
@MikeShah 8 месяцев назад
Cheers! I'm happy to hear that!
@qcnck2776
@qcnck2776 Год назад
Mike, I really appreciate seeing the non-trivial uses. Few online examples cover anything more than just a rehash of what the basic definition states. And it is always good to see the places where your code doesn't compile on the first pass: really helpful to those of us learning the quirks of the language😅. While it may add a few seconds to the video, it adds miles to troubleshooting.
@MikeShah
@MikeShah Год назад
Thank you for the kind words! Agreed, I like to leave the mistakes in -- showing how to get out of trouble is valuable and also humanizing 🙂 At the least, a different style than what is out there for folks who prefer my style 😛
@robertstrickland9722
@robertstrickland9722 Год назад
Excellent video again! Would love to see a series on streams, especially with binary data!
@MikeShah
@MikeShah Год назад
Cheers, thanks Robert! Streams are on the todo list, and some related topics eventually like serializing/deserializing data as well.
@robertstrickland9722
@robertstrickland9722 Год назад
@@MikeShah One thing I would like an explanation on, or a video on similar topics, would be why exactly having a Functor can be used as a comparison object to be inserted into a map's template argument. I understand it can be used because a map needs a comparison operation but I'm interested, and fairly uncertain, as to how the syntax and semantics or C++ allows it.
@MikeShah
@MikeShah Год назад
@@robertstrickland9722 Noted! I think that would be a good video
@thestarinthesky_
@thestarinthesky_ Год назад
Thanks Mike for these great STL series. I am learning a lot. I just have a question: if i have a vector of size n and want to create a std::map from this vector , would that be o(log(n))*n?!
@MikeShah
@MikeShah Год назад
correct, n insertions each taking log(n) time.
@joebosah2727
@joebosah2727 Год назад
Quintessential Prof, Thanks a lot. From the above, is Set, Map without value?
@MikeShah
@MikeShah Год назад
Yup, that's essentially it 🙂we might think of 'set' more naturally with union/intersection operations mathematically, but from a programming perspective, set lacks a value :) both usually rb-tree, ordered, and store unique values.
@edkachalov
@edkachalov 6 месяцев назад
New standarts of C++ become more and more ASCii art.
@MikeShah
@MikeShah 6 месяцев назад
😅
@user-cs2qb1pg9o
@user-cs2qb1pg9o Год назад
Hello Mike! Nice vibe on your videos, thank you! Btw, I tried understanding why the member operator< didn't work for you, but couldn't come up with any explanation. I had no problems with both a member operator< and a friend one 🤔.
@MikeShah
@MikeShah Год назад
Hmm, let me know if it is not working at what timestamp and I'll take a look
@VoidloniXaarii
@VoidloniXaarii Год назад
Oooo! Great one! Thank you!
@MikeShah
@MikeShah Год назад
Cheers!
@VoidloniXaarii
@VoidloniXaarii Год назад
@@MikeShah so great to see in your videos a mix of the three things I love: gfx, c++ & Linux... A maybe rare but truly heavenly mixture
@MikeShah
@MikeShah Год назад
@@VoidloniXaarii Agreed! Truly enjoy developing on Linux 😀
@gatita_liliana
@gatita_liliana Год назад
ahhhhhhhhhh thanks a lot for this great video
@MikeShah
@MikeShah Год назад
You are most welcome!
@thestarinthesky_
@thestarinthesky_ Год назад
@16:50 is it Ok to use negative numbers for types that is unsigned long int?
@MikeShah
@MikeShah Год назад
Ooops, I probably should have used a signed type. I think I was meaning to use -1 as an 'initial value'.
@thestarinthesky_
@thestarinthesky_ Год назад
Would you please make a video on structured bindings? thank you. 😍
@MikeShah
@MikeShah Год назад
Will add to the list -- this will come at some point :)
@nagenHARP
@nagenHARP 6 месяцев назад
how this working : mymap["edge1"] = Edge(0, 0 ) ; // for me this is giving error , means there should be constructor ? need your help ...
@nagenHARP
@nagenHARP 6 месяцев назад
nagendrasingh@192 mapsByMikeShah % g++ -std=c++20 mike.cpp -o prog && ./prog mike.cpp:16:19: error: no matching constructor for initialization of 'Edge' mv["Krishna"] = Edge( 1, 2 ) ; ^ ~~~~ mike.cpp:8:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided struct Edge{ ^ mike.cpp:8:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided mike.cpp:8:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 2 were provided 1 error generated
@nagenHARP
@nagenHARP 6 месяцев назад
v_map["edge1"] = Edge{1,2}; with curly braces it is working ...please help me to explain this .
@user-cs2qb1pg9o
@user-cs2qb1pg9o Год назад
fds
@syed6044
@syed6044 Год назад
Thank you very much! :)
@MikeShah
@MikeShah Год назад
You are most welcome!
Далее
C3 - First Impression [Programming Languages Episode 31]
1:17:23
🍏 Устарели ОФИЦИАЛЬНО! 🤡
00:32
А ВЫ ЛЮБИТЕ ШКОЛУ?? #shorts
00:20
Просмотров 1,9 млн
BeastMasters Hawk just had enough #ti13
00:30
Просмотров 358 тыс.
Cursor Is Beating VS Code (...by forking it)
18:00
Просмотров 64 тыс.
🍏 Устарели ОФИЦИАЛЬНО! 🤡
00:32