during the compilation of program i got an error called "segmentation fault".......
what does it mean?????
how should i clear this problem............
Printable View
during the compilation of program i got an error called "segmentation fault".......
what does it mean?????
how should i clear this problem............
First, it is "I have a question", not "I have doubt"
Second, you need to be clear about which step the segfault happens.
A segfault during actual compilation is very rare, and indicates a bug in the compiler.
Mostly, segfaults arise when you run your code.
Eg.
We would need to see your code, if you're running your code, and it crashes.Code:$ cat foo.c
#include <stdio.h>
int main ( ) {
int *p = NULL;
*p = 0; // deliberate segfault
return 0;
}
$ gcc foo.c
$ ./a.out
Segmentation fault
That means you have tried to access some memory your program doesn't own.
By magic, unless you provide more details .Quote:
how should i clear this problem........................................... ......................
Also..segmentation Faults happen during runtime , not during compilation..(unless you are using a prehistoric compiler)
[/]Sorry.. Noticed Salem's post after posting this.
Highly doubtful that it was during compilation.
It means that there is a bug where memory was attempted to be read or written from an invalid address.Quote:
what does it mean?????
Fix the bug.Quote:
how should i clear this problem............
Learn to write properly. Sentences start with a capital letter and end in a single dot, question mark, or exclamation mark. If you don't make the effort to write properly then I wont make the effort to answer your questions properly. The word "I" is always capitalised.