+ 1

What is Segmentation fault (core dumped)

How can I fix it ? please help me !

22nd Apr 2018, 11:03 PM
Ayush Bious Raj
Ayush Bious Raj - avatar
3 Respuestas
+ 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.
22nd Apr 2018, 11:16 PM
John Wells
John Wells - avatar
+ 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;
22nd Apr 2018, 11:55 PM
John Wells
John Wells - avatar
+ 2
Thanks you ! sir
22nd Apr 2018, 11:51 PM
Ayush Bious Raj
Ayush Bious Raj - avatar