From 9fe062538f302cccc8473b8152922637a2999088 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Thu, 2 Aug 2018 19:31:35 +0200 Subject: Read from stdin --- solve.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/solve.cpp b/solve.cpp index 98bc7b2..946b67f 100644 --- a/solve.cpp +++ b/solve.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include @@ -244,13 +245,10 @@ ostream& operator<<(ostream &os,const Sudoku &S){ int main(){ - const int N=15,BW=5,BH=3; - const string fname="eureka.txt"; - // const int N=9,BW=3,BH=3; - // const string fname="easy2.txt"; + // const int N=15,BW=5,BH=3; + const int N=9,BW=3,BH=3; - ifstream is(fname); - Sudoku S(readfile(is)); + Sudoku S(readfile(cin)); Sudoku origS(S); auto solutions=S.solve(); -- cgit v1.2.3-70-g09d2