Read csv data into a struct

tjb tyler.brough at usu.edu
Fri Mar 2 13:50:12 PST 2012


Woops.  I have a mistake in the code.  Should be:

import std.stdio : writeln;
import std.stream;

void main() {
  auto fin = new File("temp.csv");
  char[] line;

  int count;
  while(!fin.eof()) {
    line = fin.readLine();
    writeln(line);
  }
}

Thanks!

TJB


More information about the Digitalmars-d-learn mailing list