segmented error??

Discussion in 'C' started by rati, Sep 12, 2006.

  1. rati

    rati New Member

    Joined:
    Sep 12, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    hi can anyone tell me please what is segmented error , i have made a program in c on linux and when i am running it after compiling , after a few inputs it shows segmwntwd erroe. what is this??
     
  2. Essial

    Essial New Member

    Joined:
    Sep 12, 2006
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    0
    "Segmented error" or segfault? Sounds like you have some invalid pointers floating around or something.
     
  3. rati

    rati New Member

    Joined:
    Sep 12, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    I had no pointers in the program but had one temp ptr which I never used. probably is freeing it. I am checking that. anyway thanks for the tip.
     
  4. Essial

    Essial New Member

    Joined:
    Sep 12, 2006
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    0
    To quote Wikipedia:
    A segmentation fault (often shortened to segfault) is a particular error condition that can occur during the operation of computer software. A segmentation fault occurs when a program attempts to access a memory location that it is not allowed to access, or attempts to access a memory location in a way that is not allowed (for example, attempting to write to a read-only location, or to overwrite part of the operating system).
    (end quote)

    Now this can also occur in a function that has invalid parameters passed also. If the program is small, you can paste it and I'll take a look at it when i get the chance.
     
  5. rati

    rati New Member

    Joined:
    Sep 12, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Yes I have recitifed the probs.
     
  6. rati

    rati New Member

    Joined:
    Sep 12, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Thanks for the quote but my window was opened when I was looking at the code by your previous reply.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice