STL std::vector | Modern Cpp Series Ep. 116

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

►Lesson Description: In this lesson I give you a full look at one of the most popular data structures, the vector. std::vector is a dynamic array (nothing to do with vectors in linear algebra!), and it dynamically resizes as you add elements into the data structure, and also has the ability to shrink. Because vectors are contiguous data structures, they also are generally very perform very well.

►Please like and subscribe to help the channel!
Рекомендации по теме
Комментарии
Автор

I just came here after reading the definition of std::vector from that site. I think that it is not detailed enough (the documentation), glad I found your channel.

waldek
Автор

Mike, Your videos are exceptional. I thoroughly enjoy using your content to improve my programming skills. Thank you!

andrewgannon
Автор

Appreciate showing the use of mixing and matching various components like span. Would be great to see more of those. And the connection to C. There is a fair amount of C in the embedded world, and adding C++ may be very helpful.

qcnck
Автор

Would be interesting if you could compare the different containers/data structures and quick scenarios on when to use them. Vectors, Arrays, Associative Arrays, std::map, etc that makes other programming languages for productive for programmers.

MyWTFName
Автор

Great video! You mention that you don’t prefer a vector of pointers. Can you please explain why?

QWin-iryq
Автор

Thanks for the great and detailed explanations. I am preparing for job interviews and I am sure these video series on STL are gonna help me out a lot. I also love that idea of implementing vector data structure ourselves from scratch.

thestarinthesky_
Автор

Make OnlyOneElementVector : vector<T> { } ;by des-enable functions of growth and allocations; we manipulate just like owner … i just want to make some think very mad😅.
I love the STL programmer the way they making a best code<mostly very ugly> from generic algorithm and Methode.

__hannibaal__
Автор

Thanks
Nicely explained
Happy Sunday

joebosah
Автор

Sir your channel is seriously underrated..🙏

shaileshdubey
Автор

Hallo Mike, great video.
WOuld you please make a video serie expalining APIs, how they work and how to imlement them.
thank you

blaisofotso
Автор

ja, please make a video on implementing a vector from scratch, that would help with understanding how the vector class works

blaisofotso
Автор

I suggest timestamps for any video over 10 minutes in length. It's useful for when you don't have the time to watch a whole video. :)

dogdog
Автор

@16:35 we are invalidating iterator I guess. I used the code below and it worked but i needed to remove '++it' as erase method is going to move iterator to the next element in the vector:
for (auto it = vect.begin(); it != vect.end();)
{
std::cout << *it << '\n';
it=vect.erase(it);

}

thestarinthesky_