String Array To File

The code below allows the contents of a collection of strings to be written to a text file.
[codesyntax lang=”cpp”]

void grailsGenFrame::saveBuild()
{
    out.Open("/home/archman/workspace/grails/grailsSkel/build.gradle2");
    for (size_t i=0; i < str.Count(); i++)
    {
        out.AddLine(str[i]);
    }
    out.Write();
    out.Close();

}

[/codesyntax]

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

Leave a Reply

Your email address will not be published. Required fields are marked *