Hello World!
I am new at D, I'm making a sudoku solver in D, I wanted to add the option to read sudoku from a .txt file.

I am finding a bit confusing how to open, read and close files in D.

I am trying to mimic the C code:

FILE *f_in;
f_in=fopen("sudoku.txt");
if (f_in==NULL){
exit(1);
}
while(ch=fgetc() != EOF){
//convert char to int... put char in matrix...
}

could you help me? thank you, I appreciate it!
-Tabamon.

Reply via email to