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] = a.txt array[0][1] = b.txt and so on...Perhaps there is a better way to go about this but this seems as good a way as any to me.
You should probably use the GPtrArray. And as you iterate through your list of files you can do g_ptr_array_add( my_array, g_strdup(filename) ). To iterate through the array you do: for( i = 0; i < my_array->len; i++ ) g_print( "%s", g_ptr_array_index(my_array, i) ); Don't forget to free the filenames stored in the GPtrArray. -- Greg Suarez _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list