Testing for logic errors in non-optimized recursive loop

I had trouble with my previous diminish functions in my sudoku class so I rewrote them, this time recursively. Just as I had expected it loops for ever, although i was able to tweak it to force to break off after x number iterations so I doubt it is infinite. When I did, it would do one of two things: 1) work, 2) not work. Which is what my other pre-recursive diminish functions would do. Instead of looping taking away a square from a completed sudoku puzzle and checking to see if it was still solveable, and continuing to remove squares repeatedly until the puzzle became unsolveable, and afterwards would reintroduce the last number that it removed from the sudoku, all I have been able to accomplish is to remove 1 number, and even then sometimes the resulting puzzle is or is not still solveable. I want to check to see if my new recursive function would do the job, if allowed to run its course. (Also when it doesn't segfault, but I have a feeling that might be because some of the sudoku instances i am declaring in the recursive portion of the funtion?????) How can I go about that?

Would any of you be able to look at my code and give me some suggestions? For reasons I would rather not discuss I would prefer not to post them on the forum but will be happy show any interested partied by email. (Its just a private project I'm working on and don't want the code posted on the net is all...)

Thanks in advance
Is there any way you can avoid the recursion altogether? Quite a of us on this forum wouldn't agree to deal with it. I would, though.

-Albatross
I could provide both the pre and post recursive functions?
think i found out what it was. I was using a int points; to keep track of the difficulty of the sudoku, and in my diminish function if the new sudoku had a harder difficulty level I would set the return value to it, but in my haste i was forgetting to call the solve() function which is what sets the points value to a non-sentinnle. Thanks though anyway :)
Topic archived. No new replies allowed.