import std.stdio;

struct S {
        int i;
        int j;
}

int main(string[] args) {
        S[] ss = void;
        ss.length = 5;
        foreach (ref s; ss)
                s = S(1, 2);
        return 0;
}

Is the above code correct? (it doesn't work... it blows away or just give and access violation error).

I need to create a dynamic array of some struct, but don't want defer contained elements initialization (for performance reasons).

Tom;

Reply via email to