CS 1 Program segmentation fault but can't see the problem

This is a discussion on CS 1 Program segmentation fault but can't see the problem within the C Programming forums, part of the General Programming Boards category; edit: fixed the problem. thanks for looking though. It really is that every time I post here no matter how ...

  1. #1
    Registered User
    Join Date
    Aug 2010
    Posts
    42

    CS 1 Program segmentation fault but can't see the problem

    edit: fixed the problem. thanks for looking though. It really is that every time I post here no matter how long I've been trying on my own I figure it out right after. It's crazy.

    I was like oh I changed my arrays to global but I'm still passing them, let me change that so I don't look like a coding noob and then boom it works. with 1 minor kink of not correctly switching if sums are the same but have different differences (tiebreaker)
    Last edited by DaNxTh3xMaNx; 09-29-2010 at 03:50 PM.

  2. #2
    Registered User NeonBlack's Avatar
    Join Date
    Nov 2007
    Posts
    435
    This happens fairly frequently. Sometimes, you get frustrated working on a problem and doing something else clears your mind enough that you can solve the problem easily when you come back to it. Next time, just take a 15 minute break.
    Putting the problem into your own words can also help. Explain it to your roommate, or mom, or whoever will listen, even if she has no clue what you're talking about.
    I copied it from the last program in which I passed a parameter, which would have been pre-1989 I guess. - esbo

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 07-26-2007, 10:55 AM
  2. Segmentation fault
    By bennyandthejets in forum C++ Programming
    Replies: 7
    Last Post: 09-07-2005, 06:04 PM
  3. Problem with simple XOR program
    By spike_ in forum C++ Programming
    Replies: 8
    Last Post: 08-17-2005, 01:09 AM
  4. strange segmentation fault
    By Lateralus in forum C Programming
    Replies: 2
    Last Post: 06-10-2005, 10:19 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21