Append to array of strings within array of structs
Paul via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Jun 5 12:44:28 PDT 2015
I'm reading some text records from file and have a simple struct
to hold records:
struct Rec
{
string[] fileLines;
}
Rec someRecords;
string someText;
to append a new record I'm doing this:
someRecords ~= Rec();
someRecords.fileLines ~= someText;
but feel there might be a way to condense this to a single
statement.. but how?
Sorry about cat-on-keyboard posting-error (again!).
More information about the Digitalmars-d-learn
mailing list