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

  1. #1
    Registered User
    Join Date
    Aug 2010

    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 02:50 PM.

  2. #2
    Registered User NeonBlack's Avatar
    Join Date
    Nov 2007
    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, 09:55 AM
  2. Segmentation fault
    By bennyandthejets in forum C++ Programming
    Replies: 7
    Last Post: 09-07-2005, 05:04 PM
  3. Problem with simple XOR program
    By spike_ in forum C++ Programming
    Replies: 8
    Last Post: 08-17-2005, 12:09 AM
  4. strange segmentation fault
    By Lateralus in forum C Programming
    Replies: 2
    Last Post: 06-10-2005, 09:19 AM