Computer Science Canada malloc help - segmentation fault |
Author: | shoobyman [ Thu Nov 06, 2008 7:11 pm ] | ||
Post subject: | malloc help - segmentation fault | ||
I have to make a program that takes an input matrix (in a 2D array) and output it's inverse. The problem i have is allocating memory to the dynamic array. And yes, it must be a dynamic array and it must use malloc to allocate the memory. Please help, it's been KILLING me for the past couple days. It compiles, but when i run it i get a segmentation fault.
Thanks is advance. |
Author: | OneOffDriveByPoster [ Thu Nov 06, 2008 8:19 pm ] | ||
Post subject: | Re: malloc help - segmentation fault | ||
shoobyman @ Thu Nov 06, 2008 7:11 pm wrote:
What are the requirements? Why do you have to use malloc? C has variable length arrays. |