File To String Array

The following code will place the contents of a text file into a string array.

[codesyntax lang=”cpp”]

void grailsGenFrame::OnmenOpt1Selected(wxCommandEvent& event)
    wxArrayString str;
    wxTextFile inf;
    wxString fbuf;
    for ( fbuf = inf.GetFirstLine(); !inf.Eof(); fbuf = inf.GetNextLine() )



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 *