Append to array of strings within array of structs

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 5 12:46:35 PDT 2015


On Friday, 5 June 2015 at 19:44:29 UTC, Paul wrote:
> someRecords ~= Rec();
> someRecords.fileLines ~= someText;

You could condense them this way:

someRecords ~= Rec([someText]);


The Rec() can take arguments for the initial values, so an array 
starting with the someText should be cool


More information about the Digitalmars-d-learn mailing list