Struct Initialization
Part of TutorialFundamentals
Description
Shows a quick way to initialize a struct.
Example
struct Foo { int bar, baz, bam; } void main() { static Foo[] myfoo = [ { 0, 1, 2 }, { bar: 3, baz: 4, bam: 5 }, { bam: 8, baz: 7, bar: 6 }, ]; }
Source
Based on D/22815 by Vathix on 30 Jan 2004.