1 Attachment(s)
Segmentation Fault related to the malloc usage in an iterative loop
Dear Programmers,
I developed a program with the pointer as matm. And now i want to use it iteratively for different files called from the same directory through my program. It is very big program. So i am writing the referred lines here in the attached file (appended below). As soon as the control reaches to second iteration in the last loop at for(i=0;i<1;i++).
It runs correctly only when the i<1 in the above loop. As soon as i> 1, it says Segmentation Failure, doesn't run further and is is aborted.
May you please solve me this issue? I understand somewhere there is some problem with calling the matm pointer. But please guide me where is the problem and find the desired code modules attached referred in the mail.
Please go through the attachment for the same.
Thanks & Regards
Ashish Runthala