this is the working 3x3 sudoku but i still need to do 6x6 and 9x9. i need help please and suggestions.

<replaced code with attachment>

William Hemsworth commented: You posted way too much code +0

You need to turn the computer off and think about how to solve the problem before you confuse yourself with any more code. There is too much of it.

Here are some hints.

• A 3x3 grid can be solved by placing the numbers 1 through 9 in it in any order.
So long as there are no duplicates and the grid is completely filled, it is solved.
• A specific row of the 3x3 grid can have up to six numbers excluded from it.
• Likewise with a column.

Each one of those hints suggests a function to test a given number:

• Is the number already in the 3x3 grid or not?
• Is the number already in the 9x1 row or not?
• Is the number already in the 1x9 column or not?

Don't if..else every possible combination. There are too many. Use your procedures in an algorithm to test numbers until you can find a valid match or potential match.

I suspect your teacher will expect you to use some recursion to solve this problem. (If you are just doing this on your own, then I suggest you use some recursion to solve this problem.)

Hope this helps.

I cant even see the quick reply box because you posted so much code...

I just wrote a new OS and here is the code.

[500K Lines Here]

Yeah and I forgot to add

``cout<<"Hello World\n";``

at the beginning.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.