hi,

whilst converting some of my C code into D i got stuck.

in C:

typedef struct { /* info */ } INFO;
INFO info;
size_t checkio;
// read INFO from data file:
pf_datafile = fopen("datafile","rb");
checkio = fread((char *) &info, sizeof(info), 1, pf_datafile);

how do i do this in D? i'd like to avoid falling back to calling C functions, 
but i cannot figure out how do this with phobos functions. mind you, eventually 
the INFO struct might be anywhere in the file, not only at the beginning.

cheers,

det

Reply via email to