game:)prog_

This is a complete
implementation of a
Sudoku solving
programme. It reads a
9x9 matrix of ints from
a text file (specified in main), and prints the
completed board to
stdout. The input file should
look like:
BEGIN sudoku.in
5 3 0 0 7 0 0 0 0
6 0 0 1 9 5 0 0 0
0 9 8 0 0 0 0 6 0
8 0 0 0 6 0 0 0 3
4 0 0 8 0 3 0 0 1
7 0 0 0 2 0 0 0 6
0 6 0 0 0 0 2 8 0
0 0 0 4 1 9 0 0 5
0 0 0 0 8 0 0 7 9
END sudoku.in


# i n c l u d e < i o s t r e a m >
# i n c l u d e < f s t r e a m >
u s i n g n a m e s p a c e s t d ;
c l a s s S u d o k u B o a r d;
v o i d p r i n t B ( S u d o k u B o a r d s b ) ;
t y p e d e f u n s i g n e d i n t u i n t ;
c o n s t u i n t M A X V A L = 9 ;
c o n s t u i n t L = 9 ;
c o n s t u i n t C = 9 ;
c o n s t u i n t S = L * C ;
c o n s t u i n t Z O N E L = 3 ;
c o n s t u i n t Z O N E C = 3 ;
c o n s t u i n t Z O N E S = Z O N E L * Z O N E C ;
c o n s t u i n t l i n e E l e m e n t s [ L ] [ C ] = { { 0 , 1 , 2 , 3 , 4 , 5 , 6 , { 9 , 1 0 , 1 1 , 1 2 , 1 3 , 1 4 , 1 5 , 1 { 1 8 , 1 9 , 2 0 , 2 1 , 2 2 , 2 3 , 2 4 , 2 { 2 7 , 2 8 , 2 9 , 3 0 , 3 1 , 3 2 , 3 3 , 3 { 3 6 , 3 7 , 3 8 , 3 9 , 4 0 , 4 1 , 4 2 , 4 { 4 5 , 4 6 , 4 7 , 4 8 , 4 9 , 5 0 , 5 1 , 5 { 5 4 , 5 5 , 5 6 , 5 7 , 5 8 , 5 9 , 6 0 , 6 { 6 3 , 6 4 , 6 5 , 6 6 , 6 7 , 6 8 , 6 8 , 7 { 7 2 , 7 3 , 7 4 , 7 5 , 7 6 , 7 7 , 7 8 , 7 } ;