写了个程序,用debug编译运行很正常,但是release编译运行后立即关闭就会出错,请问是什么原因?
如需要代码看一下,请给个邮箱,我发给你。

解决方案 »

  1.   

    你发过来我看看
    [email protected]
      

  2.   

    以前碰过这种情况,是由于有个变量没有初始化引起的,DEBUG和RELEASE对变量初自动初始化好像不一样。可以帮你看看:[email protected]
      

  3.   

    CTool::CTool()
     : CFormView(CTool::IDD)
    {
     //{{AFX_DATA_INIT(CTool)
      // NOTE: the ClassWizard will add member initialization here
     m_fSigma = 0.0f;
     m_fRf = 0.0f;
     m_iTerm = 0;
     m_fInitPrice = 0.0f;
     m_fExePrice = 0.0f;
     t_fSigma = 0.0f;
     t_fRf = 0.0f;
     t_iTerm = 0;
     t_fInitPrice = 0.0f;
     t_fExePrice = 0.0f;
     //}}AFX_DATA_INIT
     aCalc.Initialize(m_fSigma,m_fRf,m_iTerm,m_fInitPrice,m_fExePrice);//加上这句就没问题了
    }