Code: Select all
void Project1Dlg::LoadClick(wxCommandEvent& event)
{
string line;
ifstream myfile ("testfile.txt");
if (myfile.is_open())
{
while (! myfile.eof() )
{
getline (myfile,line);
WxListBox1->InsertItems(line,0); // this is the line that I'm not doing correctly.
}
myfile.close();
}
}
Any help would be appreciated.
TIA,
Russ