This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Dynamic malloc problem


Hello,

I am writing a chess prog and I have the following problem:

sine I allocate memory with malloc for table in the main() it works
perfectcly. As soon as I try to allocate this memory in a function (void
my_funct() ... ) I get a segm. fault.

What can I do. Is there another way to dynamicaly allocate mem ?

Thanks,
serge;



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]