Memory allocation using g_malloc




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 correct? I'm getting a segfault
--
View this message in context: http://www.nabble.com/Memory+allocation+using+g_malloc-t1708289.html#a4637920
Sent from the Gtk+ - Apps Dev forum at Nabble.com.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]