On Mon, 27 Feb 2012 12:21:21 -0600, tjb <broug...@gmail.com> wrote:

All,

I am just starting to learn D. I am an economist - not a programmer, so I appreciate your patience with lack of knowledge.

I have some financial data in a binary file that I would like to process. In C++ I have the data in a structure like this:

struct TaqIdx {
   char symbol[10];
   int tdate;
   int begrec;
   int endrec;
}

And I use an ifstream to cast the data to the structure in read. I'm struggling to get a handle on I/O in D. Can you give some pointers? Thanks so much!

TJB

This is about the simplest way to read binary data in:

auto data = cast(TaqIdx[]) std.file.read(filename);

Reply via email to