|
-
Jun 3rd, 2004, 02:50 AM
#1
Thread Starter
Addicted Member
stl vector uses link list ?????????
stl vector uses link list ?????????
-
Jun 3rd, 2004, 04:56 AM
#2
-
Jun 3rd, 2004, 07:32 AM
#3
Thread Starter
Addicted Member
stl vector uses link list ?????????
You mean it is a dynamic array.
-
Jun 3rd, 2004, 10:21 AM
#4
Frenzied Member
Yeah basically. The major difference between the two is random access.
Check out my vectro info
http://www.techno-coding.com/pages/t...tor/vector.htm
I also have some basic tutorials for vectors as well.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Jun 7th, 2004, 01:06 AM
#5
Thread Starter
Addicted Member
stl vector uses link list ?????????
How does vector allocate memory?
-
Jun 7th, 2004, 04:40 AM
#6
Fanatic Member
With an allocator object, which asks the system for the memory. (and may do other stuff - you can write your own allocator for special purposes).
-
Jun 7th, 2004, 04:45 AM
#7
Thread Starter
Addicted Member
stl vector uses link list ?????????
Thanks.
If I want to add new items in the vector then
it creates a new array of new size and copy the old array into it and delete the old array.Is it?
-
Jun 7th, 2004, 05:02 AM
#8
Fanatic Member
If there's not enough space for the new item, it will have to allocate a new array and copy, yes. But when it has to do that, it will allocate more memory than it's currently using (doubling in size I think) so that when you add more items in the future, it doesn't have to allocate and copy every time.
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
|