struct construct with array

Andrej Mitrovic andrej.mitrovich at gmail.com
Sat Mar 12 11:02:45 PST 2011


The best thing I can think of is introducing a temp variable:

void main(){
    double[3] v1 = [1.0, 2.0, 3.0];
    double[3] v2 = [2.0, 3.0, 4.0];

    double[3] v3 = v1[] + v2[];
    auto t1 = Test(v3);
}


More information about the Digitalmars-d-learn mailing list