Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 12 of 12
the code that you gave me is giving me a segmentation fault!!! if I use 1-indexing, it gives me garbage, and if I use 0-indexing it gives me segmentation fault!! ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Feb 2011
    Posts
    6

    the code that you gave me is giving me a segmentation fault!!! if I use 1-indexing, it gives me garbage, and if I use 0-indexing it gives me segmentation fault!! frustrated!

  2. #12
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,158
    Quote Originally Posted by nikhil. View Post
    the code that you gave me is giving me a segmentation fault!!! if I use 1-indexing, it gives me garbage, and if I use 0-indexing it gives me segmentation fault!! frustrated!
    Well, without seeing how refcpy[] is declared and initialized, that's about as much as I can show you. You can try running it in the debugger (gdb) and see what is going on that way.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Page 2 of 2 FirstFirst 1 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •