Re: Increasing array size

From: Christian Staudenmayer (cs21_at_wsl29.informatik.uni-ulm.de)
Date: 11/30/04


Date: 30 Nov 2004 12:18:51 +0100

On 2004-11-30, Ioannis Hadjichambis <hadjici2@cs.man.ac.uk> wrote:
> I am trying to implement a hash-table and I would like to rehash it when
> it starts to fill up. I am implementing the hash-table with an array
> of linked lists. Now for me to increase the size of the hash-table I
> must create a new array twice the size of the one before but the array
> only accepts an imediate number eg array[1000] and will not accept a
> variable eg array[count]. Does anyone know how to solve this problem?
> thanks...

Like you would use a dynamic array of a regular type, i.e. using malloc().

Greetings, Chris

-- 
Christian Staudenmayer
University of Ulm, Germany
cstaud@gmail.com


Relevant Pages

  • Re: Increasing array size
    ... > I am trying to implement a hash-table and I would like to rehash it when ... I am implementing the hash-table with an array ... Try allocating memory dynamically using mallocinstead of declaring a ... the allocated dataspace or move it to a place where sufficient memory can be ...
    (comp.lang.c)
  • Increasing array size
    ... I am trying to implement a hash-table and I would like to rehash it when ... I am implementing the hash-table with an array ... must create a new array twice the size of the one before but the array ... only accepts an imediate number eg arrayand will not accept a ...
    (comp.lang.c)
  • Re: Array formula not working properly
    ... Return email address is not as DEEP as it appears "Frank Kabel" wrote in message ... >> Leaving aside the possibility of a typo or flawed overall approach,> the SUM>> operation does not appear to operate on an array, even if I array> enter the>> formula, and that is the sole problem that I am trying to get my head>> around. ... >>> Frankfurt, Germany ...
    (microsoft.public.excel.misc)
  • Re: interesting VHF FM aerial
    ... I correspond very occasionally with a mate of his. ... He uses it to receive programmes from Germany, ... A problem with the array is that the ...
    (uk.tech.digital-tv)
  • Re: Erase numeric digits only
    ... following array ... >Frank Kabel ... >Frankfurt, Germany ...
    (microsoft.public.excel.misc)