On Tue, Aug 27, 2013 at 07:14:22PM +0200, Paul Jurczak wrote: > Correction to my initial post: > > I oversimplified the code example by snipping too much of context. > Here is an example, which fails both on Windows and Linux: > > module main; > > import std.stdio, std.file, std.string, std.algorithm, std.range, > std.datetime, std.conv, std.typetuple; > > int e67_1(string fileName = r"67.txt") { > // Read triangle numbers from file. > int[][] cell; > > foreach (y, line; splitLines(cast(char[]) read(fileName))) {
Maybe try inserting a writeln just before the foreach to print out what filename it's actually trying to read? Or try using File to open it and see if you get the same error? auto f = File(fileName, "r"); T -- Ignorance is bliss... until you suffer the consequences!