September 6th, 2003, 08:38 AM
Hello, i am having trouble with my function. After compiling, it always return segmentation fault. I am a first year student in com sci and the function i am dealing with is a recursive sorting algorithm, quite similar to bubble sort. By the way, i use the cygwin emulator. :(
September 6th, 2003, 08:44 AM
Basically, what causes a segmentation fault? Thx
September 6th, 2003, 09:06 AM
In your case segmentation fault is due to infinite recursive call which will result in stack over flow.
Check for the conditions u have in your program.
Usually segmentation faults occurs due to reference to a memory which has been used for some other purposes
September 6th, 2003, 09:10 AM
thank you. I will look up on that