appending newly initialized struct to array
Somedude
lovelydear at mailmetrash.com
Wed Apr 18 04:08:48 PDT 2012
Le 18/04/2012 12:41, maarten van damme a écrit :
> That's a very odd design. Making it work when instantiating a new struct
> of that type but not inline. Anyway, test(3,5) works perfect, thank you.
It's not odd at all. You append a structure, not an array.
{3,5} is for array initialization, it's the same syntax as in C, C++,
Java, C#.
What if you want to append an array of structures ?
why~=[test(3,5), test(3,6)];
More information about the Digitalmars-d-learn
mailing list