On Tuesday, 9 January 2018 at 13:49:41 UTC, Vino wrote:
Hi All,

It is possible to store struct in a array ans use the same in csvReader

Sure, you can just pass the type of your struct to csvReader:

struct Layout { string name; int value; double other; }

auto readArrayOfStructs(string fname) {
    Array!Layout res;
    foreach(record; fname.readText.csvReader!Layout('\t')) {
        res ~= record;
    }
    return res;
}

Reply via email to