help generating an array of array with malloc or calloc
From: Eric Boutin (eric_at_nic.nac.wdyn.de)
Date: 11/30/03
- Next message: pete: "Re: help generating an array of array with malloc or calloc"
- Previous message: Nejat AYDIN: "Re: Convert HEX string to bin"
- Next in thread: pete: "Re: help generating an array of array with malloc or calloc"
- Reply: pete: "Re: help generating an array of array with malloc or calloc"
- Reply: Nejat AYDIN: "Re: help generating an array of array with malloc or calloc"
- Reply: Joe Wright: "Re: help generating an array of array with malloc or calloc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 Nov 2003 09:06:51 -0500
Hi ! I would like to generate an array of type char[n][5];
I just dont really figure out how I could do it with malloc or calloc.. I
mean.. I know how to allocate a simple array with both of them; but when it
comes to a 2 dimension array.. I'm stuck.. I mean.. if I ask for char**
array = malloc(5*n*sizeof(char));, it'll return a void*, not a void**..
anyone have an idea ?
- Next message: pete: "Re: help generating an array of array with malloc or calloc"
- Previous message: Nejat AYDIN: "Re: Convert HEX string to bin"
- Next in thread: pete: "Re: help generating an array of array with malloc or calloc"
- Reply: pete: "Re: help generating an array of array with malloc or calloc"
- Reply: Nejat AYDIN: "Re: help generating an array of array with malloc or calloc"
- Reply: Joe Wright: "Re: help generating an array of array with malloc or calloc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|