during the compilation of program i got an error called "segmentation fault".......
what does it mean?????
how should i clear this problem............
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
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
That means you have tried to access some memory your program doesn't own.
By magic, unless you provide more details .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.what does it mean?????
Fix the bug.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.
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"