My program is compiling without an error but when the program runs it says "segemation fault". What would cause this??? Thanks.
C programming???
It could it any number of things. Since you did not include the
source code it is hard to determine. You are doing something invalid. It is mostly likely you are accessing illegal memory through wild pointer or address or may be doing wrong arithmethic like dividing by 0. If you post your code may be so others can look at it.
If you have a debugger like gdb or ddd, load the core file.
It should tell you where it crashed.
Reply:Look for infinite Loop
Reply:This can also be an issue if you are going out of bounds on an array.
Reply:You're attempting to access memory you didn't allocate. Probably you have a pointer that's not correctly initialized, or assigned.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment