offsetof + foreach

Ellery Newcomer ellery-newcomer at utulsa.edu
Fri Sep 7 10:31:05 PDT 2012


I have a struct buffer, and I want to print out its members' offsetof.

This:

foreach(i,_t; buffer.tupleof) {
             writefln("%s@: %s", _t.stringof, _t.offsetof);
         }

complains

Error: undefined identifier 'offsetof'

what should I be doing?


More information about the Digitalmars-d-learn mailing list