Thread: Runtime error 'segmentation fault (core dumped)'

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    3

    Runtime error 'segmentation fault (core dumped)'

    Keep gettint this error in a small program of mine and have been unable to find out what it is and why i'm getting it. Program compiles fine but as soon as the user enters some data and hits enter it gives this above error.

  2. #2
    Registered User Vber's Avatar
    Join Date
    Nov 2002
    Posts
    807
    Well, Post the code, we'll try to help.
    Don't forget to use code-tags, when you post the code.

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>soon as the user enters some data and hits enter it gives this above error.
    OK, just for fun, here's my guesses:

    Are you doing either of these:

    >>char *s;
    >> fgets(s, 20, stdin);

    or maybe

    >>int i
    >>scanf("%d", i);

    Now, post your code if you want help.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What am I doing worng? Segmentation fault, core dump
    By cookie in forum C Programming
    Replies: 4
    Last Post: 06-08-2007, 09:59 AM
  2. Segmentation fault, core dumped
    By dweenigma in forum C Programming
    Replies: 2
    Last Post: 05-21-2007, 03:50 PM
  3. Locating A Segmentation Fault
    By Stack Overflow in forum C Programming
    Replies: 12
    Last Post: 12-14-2004, 01:33 PM
  4. Segmantation Fault (core dumped) error
    By Vinnie66 in forum C Programming
    Replies: 6
    Last Post: 03-25-2002, 01:34 PM
  5. Segmentation fault (core dumped)
    By JYSN in forum C Programming
    Replies: 1
    Last Post: 02-21-2002, 03:24 AM