BCS Load Text File Into wxArrayString

Sometimes a function is needed to load the contents of a text file into a wxArrayString.  The following code snippet accomplishes the desired task.

[codesyntax lang=”cpp”]

void srcColFrame::loadSC(string fs, wxArrayString sc, int ix)
    ifstream ips;
    string line;
    while (getline (ips, line))



The input file is processed line by line while simultaneously adding the line to the associated collection.

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 *