Re: Increasing array size
From: Christian Staudenmayer (cs21_at_wsl29.informatik.uni-ulm.de)
Date: 11/30/04
- Next message: Kelvin Moss: "Calling atexit"
- Previous message: Charlie Gordon: "Re: OT: Unix C programming for finding file"
- In reply to: Ioannis Hadjichambis: "Increasing array size"
- Next in thread: dandelion: "Re: Increasing array size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Kelvin Moss: "Calling atexit"
- Previous message: Charlie Gordon: "Re: OT: Unix C programming for finding file"
- In reply to: Ioannis Hadjichambis: "Increasing array size"
- Next in thread: dandelion: "Re: Increasing array size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|