请教:
我加入代码后工程运行以后提示错误如下,请问我应该怎样改才能除去错误提示,使程序运行正常???请大侠一定帮忙看看,谢谢!!!工程如下http://www.vchelp.net/ASP/cdf_pic/2...ct_1_103832.rar
提示错误如下
--Configuration: 货物管理系统 - Win32 Debug--------------------
Compiling...
BillDlg.cpp
C:\Documents and Settings\007\My Documents\货物管理系统\BillDlg.cpp(178) : error C2143: syntax error : missing ';' before '}'
C:\Documents and Settings\007\My Documents\货物管理系统\BillDlg.cpp(181) : error C2601: 'OnSave' : local function definitions are illegal
C:\Documents and Settings\007\My Documents\货物管理系统\BillDlg.cpp(211) : error C2601: 'JudgeInputReasonable' : local function definitions are illegal
C:\Documents and Settings\007\My Documents\货物管理系统\BillDlg.cpp(276) : error C2601: 'SaveBill' : local function definitions are illegal
C:\Documents and Settings\007\My Documents\货物管理系统\BillDlg.cpp(327) : error C2601: 'SaveGoods' : local function definitions are illegal
C:\Documents and Settings\007\My Documents\货物管理系统\BillDlg.cpp(375) : error C2601: 'ShowBill' : local function definitions are illegal
C:\Documents and Settings\007\My Documents\货物管理系统\BillDlg.cpp(488) : error C2601: 'GetTimeFromStr' : local function definitions are illegal
C:\Documents and Settings\007\My Documents\货物管理系统\BillDlg.cpp(506) : error C2601: 'OnExit' : local function definitions are illegal
C:\Documents and Settings\007\My Documents\货物管理系统\BillDlg.cpp(509) : fatal error C1004: unexpected end of file found
货物管理系统Dlg.cpp
C:\Documents and Settings\007\My Documents\货物管理系统\货物管理系统Dlg.cpp(308) : error C2601: 'OnBuyAdd' : local function definitions are illegal
C:\Documents and Settings\007\My Documents\货物管理系统\货物管理系统Dlg.cpp(316) : error C2601: 'OnSaleAdd' : local function definitions are illegal
C:\Documents and Settings\007\My Documents\货物管理系统\货物管理系统Dlg.cpp(325) : error C2601: 'OnBillShow' : local function definitions are illegal
C:\Documents and Settings\007\My Documents\货物管理系统\货物管理系统Dlg.cpp(358) : error C2601: 'OnExitWindow' : local function definitions are illegal
C:\Documents and Settings\007\My Documents\货物管理系统\货物管理系统Dlg.cpp(361) : fatal error C1004: unexpected end of file found
Generating Code...
Error executing cl.exe.货物管理系统.exe - 14 error(s), 0 warning(s)

解决方案 »

  1.   

    error C2601: 'OnSave' :  local function definitions are illegal 是什么错啊???? 部分原码void CBillDlg::OnSave() 
    {
    UpdateData(TRUE);//初始化数组
    //BOOL* RowReasonable = new BOOL[m_Grid.GetRowCount()];
    //for(int row = 0; row < m_Grid.GetRowCount(); row++)
      RowReasonable[row] = FALSE;
    if(JudgeInputReasonable(RowReasonable))
    {
      int nResult = AfxMessageBox("保存单据?",MB_YESNOCANCEL,0);
      if( nResult == IDYES )
      {//保存单据
       if(SaveBill())
       {   
        AfxMessageBox("保存单据成功");
        SaveGoods(RowReasonable);
       }
      }
      else if( nResult == IDCANCEL)
      { //暂时不保存,继续编辑单据
       delete RowReasonable;
       return;
      }
      delete RowReasonable;
      CDialog::OnOK();
      return;
    }
    delete RowReasonable;
    }
      

  2.   

    local function definitions are illegal:
    你到OnSave()这个函数上面的代码上检查一下,是不是有{}不匹配的问题。
      

  3.   

    我很矛盾:比如把void CBillDlg::OnSave()注销,则错误提示error C2601: 'OnSave' :  local function definitions are illegal 没了,可工程运行后按钮"保存"就没功能了 bohut(伯虎) 大侠你好,你能不能举个例子说说什么是"有{}不匹配的问题"谢谢!!!
      

  4.   

    说的多清楚:
    \货物管理系统\BillDlg.cpp(178) : error C2143: syntax error : missing ';' before '}'
      

  5.   

    \货物管理系统\BillDlg.cpp(178)
    你少写个“;”