Why does this tell me i'm missing ")"'s?

p.s. Will it work? I'm not sure how to use ofstream great?

Code:
void fincal2Frame::OnClose(wxCloseEvent &event)
{
    theBar->RemoveIcon();
    fout.open("list.bin");
    for (int i = 0; i < m_TheList->getSize();i++){
        BillData billdat = m_TheList->getDat(i);
        fout.write((char*)&billdat.Cost, sizeof wxString);
        fout.write((char*)&billdat.DueDate, sizeof wxDateTime);
        fout.write((char*)&billdat.Name, sizeof wxString);
    }
    fout.close();
    Destroy();
}