急求VC++高手.找不到头文件stdafx.h 程序如下 但在VC++6.0中调式的时候出现了一个错误,不知道怎么解决
程序#include"stdafx.h"#include"SimpleFormula.h"#include"SimpleFormulaDlg.h"#include<mat...
程序
#include "stdafx.h"
#include "SimpleFormula.h"
#include "SimpleFormulaDlg.h"
#include <math.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
{
//{{AFX_DATA_INIT(CSimpleFormulaDlg)
m_dA = 0.0;
m_dB = 0.0;
m_dI = 0.0;
m_dk = 0.0;
m_dL = 0.0;
m_dm = 0.0;
m_dn = 0.0;
m_dq = 0.0;
m_dR = 0.0;
m_dT = 0.0;
m_dV1 = 0.0;
m_dV2 = 0.0;
m_dV3 = 0.0;
//}}AFX_DATA_INIT
//{{AFX_DATA_MAP(CSimpleFormulaDlg)
DDX_Text(pDX, IDC_EDIT_A, m_dA);
DDX_Text(pDX, IDC_EDIT_B, m_dB);
DDX_Text(pDX, IDC_EDIT_I, m_dI);
DDX_Text(pDX, IDC_EDIT_K, m_dk);
DDX_Text(pDX, IDC_EDIT_L, m_dL);
DDX_Text(pDX, IDC_EDIT_M, m_dm);
DDX_Text(pDX, IDC_EDIT_N, m_dn);
DDX_Text(pDX, IDC_EDIT_Q, m_dq);
DDX_Text(pDX, IDC_EDIT_R, m_dR);
DDX_Text(pDX, IDC_EDIT_T, m_dT);
DDX_Text(pDX, IDC_EDIT_V1, m_dV1);
DDX_Text(pDX, IDC_EDIT_V2, m_dV2);
DDX_Text(pDX, IDC_EDIT_V3, m_dV3);
//}}AFX_DATA_MAP
}
/*
* A=(V2-V1)/m ,
B=(V3+V1-2V2)/m 平方 ,
n=(-q* I平方*B)/(k*T) ,
R=A- 根号(-n*k*T*B/q),
L=I*exp(-q(V1-I*R)/(n*k*T))
*/
void CSimpleFormulaDlg::OnOK()
{
// TODO: Add extra validation here
UpdateData(TRUE);
m_dA=(m_dV2-m_dV1)/m_dm;
m_dB=(m_dV3+m_dV1-2*m_dV2)/(m_dm* m_dm);
m_dn=(-m_dq* m_dI*m_dI*m_dB)/(m_dk*m_dT);
m_dR=m_dA-sqrt(-m_dn*m_dk*m_dT*m_dB/m_dq);
m_dL=m_dI*exp(-m_dq*(m_dV1-m_dI*m_dR)/(m_dn*m_dk*m_dT));
UpdateData(FALSE);
// CDialog::OnOK();
}
void CSimpleFormulaDlg::OnCancel()
{
// TODO: Add extra cleanup here
CDialog::OnCancel();
}
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by SimpleFormula.rc
//
#define IDM_ABOUTBOX 0x0010
#define IDD_ABOUTBOX 100
#define IDS_ABOUTBOX 101
#define IDD_SIMPLEFORMULA_DIALOG 102
#define IDR_MAINFRAME 128
#define IDC_EDIT_M 1000
#define IDC_EDIT_K 1001
#define IDC_EDIT_T 1002
#define IDC_EDIT_Q 1003
#define IDC_EDIT_V1 1004
#define IDC_EDIT_V2 1005
#define IDC_EDIT_V3 1006
#define IDC_EDIT_I 1007
#define IDC_EDIT_A 1008
#define IDC_EDIT_B 1009
#define IDC_EDIT_N 1010
#define IDC_EDIT_R 1011
#define IDC_EDIT_L 1012
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
调试后出现的错误是这样的
Cannot open include file: 'stdafx.h': No such file or directory
执行 cl.exe 时出错. 展开
#include "stdafx.h"
#include "SimpleFormula.h"
#include "SimpleFormulaDlg.h"
#include <math.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
{
//{{AFX_DATA_INIT(CSimpleFormulaDlg)
m_dA = 0.0;
m_dB = 0.0;
m_dI = 0.0;
m_dk = 0.0;
m_dL = 0.0;
m_dm = 0.0;
m_dn = 0.0;
m_dq = 0.0;
m_dR = 0.0;
m_dT = 0.0;
m_dV1 = 0.0;
m_dV2 = 0.0;
m_dV3 = 0.0;
//}}AFX_DATA_INIT
//{{AFX_DATA_MAP(CSimpleFormulaDlg)
DDX_Text(pDX, IDC_EDIT_A, m_dA);
DDX_Text(pDX, IDC_EDIT_B, m_dB);
DDX_Text(pDX, IDC_EDIT_I, m_dI);
DDX_Text(pDX, IDC_EDIT_K, m_dk);
DDX_Text(pDX, IDC_EDIT_L, m_dL);
DDX_Text(pDX, IDC_EDIT_M, m_dm);
DDX_Text(pDX, IDC_EDIT_N, m_dn);
DDX_Text(pDX, IDC_EDIT_Q, m_dq);
DDX_Text(pDX, IDC_EDIT_R, m_dR);
DDX_Text(pDX, IDC_EDIT_T, m_dT);
DDX_Text(pDX, IDC_EDIT_V1, m_dV1);
DDX_Text(pDX, IDC_EDIT_V2, m_dV2);
DDX_Text(pDX, IDC_EDIT_V3, m_dV3);
//}}AFX_DATA_MAP
}
/*
* A=(V2-V1)/m ,
B=(V3+V1-2V2)/m 平方 ,
n=(-q* I平方*B)/(k*T) ,
R=A- 根号(-n*k*T*B/q),
L=I*exp(-q(V1-I*R)/(n*k*T))
*/
void CSimpleFormulaDlg::OnOK()
{
// TODO: Add extra validation here
UpdateData(TRUE);
m_dA=(m_dV2-m_dV1)/m_dm;
m_dB=(m_dV3+m_dV1-2*m_dV2)/(m_dm* m_dm);
m_dn=(-m_dq* m_dI*m_dI*m_dB)/(m_dk*m_dT);
m_dR=m_dA-sqrt(-m_dn*m_dk*m_dT*m_dB/m_dq);
m_dL=m_dI*exp(-m_dq*(m_dV1-m_dI*m_dR)/(m_dn*m_dk*m_dT));
UpdateData(FALSE);
// CDialog::OnOK();
}
void CSimpleFormulaDlg::OnCancel()
{
// TODO: Add extra cleanup here
CDialog::OnCancel();
}
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by SimpleFormula.rc
//
#define IDM_ABOUTBOX 0x0010
#define IDD_ABOUTBOX 100
#define IDS_ABOUTBOX 101
#define IDD_SIMPLEFORMULA_DIALOG 102
#define IDR_MAINFRAME 128
#define IDC_EDIT_M 1000
#define IDC_EDIT_K 1001
#define IDC_EDIT_T 1002
#define IDC_EDIT_Q 1003
#define IDC_EDIT_V1 1004
#define IDC_EDIT_V2 1005
#define IDC_EDIT_V3 1006
#define IDC_EDIT_I 1007
#define IDC_EDIT_A 1008
#define IDC_EDIT_B 1009
#define IDC_EDIT_N 1010
#define IDC_EDIT_R 1011
#define IDC_EDIT_L 1012
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
调试后出现的错误是这样的
Cannot open include file: 'stdafx.h': No such file or directory
执行 cl.exe 时出错. 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询