|
-
Mar 10th, 2002, 09:38 PM
#1
Thread Starter
Hyperactive Member
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?
Amon Ra
The Power of Learning.
-
Mar 10th, 2002, 09:39 PM
#2
Thread Starter
Hyperactive Member
even better i anone could give me the name of a good tutorialthanks in advance..
Amon Ra
The Power of Learning.
-
Mar 10th, 2002, 10:17 PM
#3
Thread Starter
Hyperactive Member
nevermind gee..figured it out
Amon Ra
The Power of Learning.
-
Mar 11th, 2002, 10:17 AM
#4
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.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 12th, 2002, 12:20 PM
#5
Monday Morning Lunatic
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.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Mar 13th, 2002, 08:26 AM
#6
Or maybe a set, because this is sorted and would speed up your search for the right HWND.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 13th, 2002, 10:56 AM
#7
Thread Starter
Hyperactive Member
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..
Amon Ra
The Power of Learning.
-
Mar 13th, 2002, 10:58 AM
#8
The C++ STL includes a container called set. I don't know kow to use it, parksie may know a reference page.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 13th, 2002, 12:10 PM
#9
Monday Morning Lunatic
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|