ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
The Mem_Stuff that you have declared is a 'pointer to a pointer to something'. You are treating it as a 'array of pointers', which is also fine. However, you have not made space for the array, so when you attempt to assign to one of the pointers, you get the fault.
You need to first allocate space for the array itself, before allocating the spaces that the pointer elements are going to point to.
=== edit - see above post! ===
Last edited by neonsignal; 03-20-2010 at 05:58 PM.