Formatted input from text file
IK
istvan.karolyi at rocketmail.com
Mon Jun 18 08:11:20 PDT 2012
Hmm does your code generate a 1D `array` as a grid, bearophile?
Anyway thanks, I'll compile it shortly.
My own code evolved to what's below and gives a Range violation.
Also I don't understand why formattedRead can't just accept a casted
`opSlice.dup`, is it a bug?
void main()
{
uint[20][20] grid;
auto input_file = new MmFile("p011_input.txt");
string temp = cast(string)input_file.opSlice;
formattedRead(temp, "%(%(%s %)\n%)", &grid);
}
More information about the Digitalmars-d-learn
mailing list