-
vectors
i know how to add an element to a vector, how to remove the back, but how do i remove let's say the one in the middle? since the elements are going to be objects. i want to remove the one that has the hWnd == wnd.Hwnd, and remove it, how would i do that? remove a specific element?
-
even better i anone could give me the name of a good tutorialthanks in advance..
-
nevermind gee..figured it out :rolleyes:
-
You can delete threads by editing the first post, checking the delete checkbox and then pressing the delete button.
I recommend that you delete threads where you found out the answer yourself before anyone could answer. If someone answered, leave the thread, because someone else might actually search the forum.
-
And leaving them lets me wander in with random tidbits...
If you're going to be regularly removing an item from the middle, it's better to use a list rather than an array.
-
Or maybe a set, because this is sorted and would speed up your search for the right HWND.
-
well, CornedBee, the thing is that i dont really know how to create sets, binary tree or any algorithms..i know how to create a
a simple linked list, but that's it..mayby if it's not out of your way, could you lead me to a tutorial or something? thanks.. :)
-
The C++ STL includes a container called set. I don't know kow to use it, parksie may know a reference page.
-