From 0f467eb5990b6065872e86ff341af6aa70049fbc Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Sun, 5 Apr 2015 17:57:21 +0100 Subject: [PATCH] Pull out the solver. --- examples/c++/example.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/c++/example.cpp b/examples/c++/example.cpp index 41d90f2a9..750933cba 100644 --- a/examples/c++/example.cpp +++ b/examples/c++/example.cpp @@ -989,8 +989,9 @@ void sudoku_example() { x.push_back(c.int_const(x_name.str().c_str())); } - // each cell contains a value in {1, ..., 9} solver s(c); + + // each cell contains a value in {1, ..., 9} for (unsigned i = 0; i < 9; ++i) for (unsigned j = 0; j < 9; ++j) { s.add(x[i * 9 + j] >= 1 && x[i * 9 + j] <= 9);