At 07:04 2007-01-28, Ray Devore wrote:
>--- Robert Ryan <[EMAIL PROTECTED]> wrote:
> > is a vector more like a small linked list if it can
> > increase and decrease at will
> >
> > Michael Brown <[EMAIL PROTECTED]> wrote:
> > In java, a vector is basically an array that can
> > grow while in runtime.  In other words, it has no
> > set length.
>
>A vector is nothing like a linked list other than they
>are both dynamic.  It is a dynamic array.  Elements of
>a vector can be accessed using subscripts as in an
>array, but you cannot do that using a linked list.
>When a vector grows the basic concept is that it
>allocates more space than it currently has and then
>copies the data from the current space to the new
>space and releases the old space.  With some compilers
>the new space is twice the size of the old space, but
>I don't think the standard states that this is
>required.  Once the space for a vector is allocated,
>it will never have less space until the space is
>released when it goes out of scope.

I don't believe this is required by the standard.


>Ray
>
>
>
>
>____________________________________________________________________________________
>Have a burning question?
>Go to www.Answers.yahoo.com and get answers from real people who know.
>
>
>To unsubscribe, send a blank message to 
><mailto:[EMAIL PROTECTED]>.
>Yahoo! Groups Links
>
>
>

Victor A. Wagner Jr.      http://rudbek.com
The five most dangerous words in the English language:
               "There oughta be a law" 

Reply via email to