+ 1
What is Segmentation fault (core dumped)
How can I fix it ? please help me !
3 odpowiedzi
+ 6
Without seeing the program, it is difficult to say. You tried to access memory you were not allowed to so the program crashed. It could be a uninitialize variable, a deference of a null pointer, an array access out of bounds overwriting data it shouldn't.
+ 4
These are the worst types of problems to find. If you add debugging statements, it could help. Thing like the following to help you figure out where and why.
cout<<"entering function x"<<endl;
cout<<"while loop body x="<<x<<endl;
+ 2
Thanks you ! sir