Re: Memory allocation using g_malloc

2006-06-21 Thread tomas
On Mon, Jun 19, 2006 at 11:59:07PM +0100, Yianni wrote: [...] OK, I'll bite. Here is a little program implementing a dynamic array with the help of realloc. Basically it defines a data type (as a pointer to a struct holding the max number of slots allocated, the number of actually used slots and a

Re: Memory allocation using g_malloc

2006-06-19 Thread Yianni
3saul wrote: > Thanks for the response. Let me elaborate a little. I have a list of files in > a dir (without knowing how many) > > a.txt > b.txt > c.txt > > I want to be able to put the names of the files into an array so that I can > refer to them later like this > > array[0][0] = a.txt > array[0

Re: Memory allocation using g_malloc

2006-06-01 Thread Greg Suarez
On 5/30/06, 3saul <[EMAIL PROTECTED]> wrote: Thanks for the response. Let me elaborate a little. I have a list of files in a dir (without knowing how many) a.txt b.txt c.txt I want to be able to put the names of the files into an array so that I can refer to them later like this array[0][0]

Re: Memory allocation using g_malloc

2006-05-31 Thread Tristan Van Berkom
3saul wrote: Thanks for the response. Let me elaborate a little. I have a list of files in a dir (without knowing how many) a.txt b.txt c.txt I want to be able to put the names of the files into an array so that I can refer to them later like this array[0][0] = a.txt array[0][1] = b.txt If y

Re: Memory allocation using g_malloc

2006-05-30 Thread 3saul
Thanks for the response. Let me elaborate a little. I have a list of files in a dir (without knowing how many) a.txt b.txt c.txt I want to be able to put the names of the files into an array so that I can refer to them later like this array[0][0] = a.txt array[0][1] = b.txt and so on...Perhaps

Re: Memory allocation using g_malloc

2006-05-30 Thread Tristan Van Berkom
3saul wrote: I need a little help with memory allocation. What I'm wanting to do is create a multi dimensional array that contains a list of file names from a specific directory. So it needs to be something like this int numfiles = 20; g_malloc (myArray [numfiles] [512]); Is this close to cor