![]() |
|
#1
|
|||
|
|||
Bus error (core dumped) Problem on my C++ programi have written a program that is suppose to check if 9*9 sudoku puzzle is correct solution. I have to check each row, column, and 3*3 regions.
I have worked out how to check the row and the column but i'm having a hard time getting the checking region to work correctly. when i compile the program i have no error message but when i run the program i get the "Bus error". i just can't figure out what i'm doing wrong so i was wondering if anyone can help me out. here is the code CPP / C++ / C Code:
i have checked already eveything works except the check_region function |
|||
|
#2
|
|||
|
|||
Re: Bus error (core dumped) Problem on my C++ programQuote:
Here's how you can help yourself (It's faster, I claim, than posting a request for help and waiting for a helpful response. It will be even faster the next time --- and there will be a next time, I'm guessing.) The error may be caused by your accessing memory out of the range of an array. If you can't see how your code cause that, then: You can put print statements in your program to see what the program is trying to do. Make the program tell you what's wrong. (Or let it verify that you are doing it right, which is entirely possible.) For example, since you think that the problem is in check_region: CPP / C++ / C Code:
If it bombs there, and one or more subsubscripts is out of range of that array, you know why it bombed, and you are where you need to be to fix it. If it doesn't bomb there, then you know more than you knew before, and you can look elsewhere. Regards, Dave |
Recent GIDBlog
Going to Iraq by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Airport Log program using 3D linked List : problem reading from file | batrsau | C Programming Language | 11 | 29-Feb-2008 07:44 |
| Pipeline freeze simulation | darklightred | CPP / C++ Forum | 6 | 27-Jul-2006 19:37 |
| Problem compiling a program, my first vector. | george89 | CPP / C++ Forum | 2 | 26-Jun-2006 21:10 |
| Runtime Problem involving "printf" in C Program | supamakia | C Programming Language | 2 | 09-Oct-2005 10:09 |
| Problem with program | breggo | CPP / C++ Forum | 3 | 08-Jun-2005 13:51 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The