Thanks every one I just catch the problem
I use the GDB and it helps me so much

I will share to you some knowledge that I just learn about gdb

a) you must turn on the system core dump ( I use linux )
      $ ulimit -c unlimited
b) Then compile your code
c) run it and if you have a segmentation fault it will print a message
"Segmentation fault (core dump)"
 (!) NOTE : you must have write permission in this current working
directory to generate this core file
d) to obtain the core file just
    $ ls core*
e) try now to make use of gdb ; run it like this
    $gdbtui $your_executable_file $core_file
c) you can now debug using those commands
    run : to run the program
    print $variable: to print a variable value

Sorry for interrupt

Reply via email to