March 12, 2011 Re: struct construct with array | ||||
|---|---|---|---|---|
| ||||
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);
}
| ||||
March 12, 2011 Re: struct construct with array | ||||
|---|---|---|---|---|
| ||||
Attachments:
| On Sat, Mar 12, 2011 at 1:02 PM, Andrej Mitrovic <andrej.mitrovich@gmail.com > wrote: > 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); > } > Thanks, but I want to do it in one line, without creating a temporary. | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply