Reading formatted file
Tabamon
tosky.lory at gmail.com
Thu Jun 27 13:31:23 UTC 2019
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.
More information about the Digitalmars-d-learn
mailing list