?? calculate2dlg.h
字號:
// calculate2Dlg.h : header file
//
#if !defined(AFX_CALCULATE2DLG_H__365B406F_9EA1_494B_A07C_E551C14BA78C__INCLUDED_)
#define AFX_CALCULATE2DLG_H__365B406F_9EA1_494B_A07C_E551C14BA78C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CCalculate2Dlg dialog
class CCalculate2Dlg : public CDialog
{
// Construction
typedef struct
{
char *base;
char *top;
int stacksize;
}SqStackChar;
typedef struct
{
float *base;
float *top;
int stacksize;
}SqStackData;
public:
CCalculate2Dlg(CWnd* pParent = NULL); // standard constructor
CString m_show;
void ReadOpr(char Opr[8][8]); //設置優(yōu)先規(guī)則
void InitStackChar(SqStackChar *s); //初始化數(shù)棧
void InitStackData(SqStackData *s); //初始化字符棧
void PopChar(SqStackChar *s,char *e);
void PopData(SqStackData *s,float *e);
void PushChar(SqStackChar *s,char n);
void PushData(SqStackData *s,float n);
char GetTopChar(SqStackChar *s);
float GetTopData(SqStackData *s);
float Operate(float a,char theta,float b); //計算
char Precede(char a,char b,char Opr[8][8],char cha[7]); //比較優(yōu)先規(guī)則
int In(char c,char cha[7]); //判斷字符
// Dialog Data
//{{AFX_DATA(CCalculate2Dlg)
enum { IDD = IDD_CALCULATE2_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCalculate2Dlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CCalculate2Dlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
virtual void OnOK();
afx_msg void OnButton7();
afx_msg void OnButton8();
afx_msg void OnButton9();
afx_msg void OnButton1add();
afx_msg void OnButton4();
afx_msg void OnButton5();
afx_msg void OnButton6();
afx_msg void OnButton1plus();
afx_msg void OnButton1();
afx_msg void OnButton2();
afx_msg void OnButton3();
afx_msg void OnButton1multiply();
afx_msg void OnButton0();
afx_msg void OnButtondot();
afx_msg void OnButtondiv();
afx_msg void OnButtonleft();
afx_msg void OnButtonright();
virtual void OnCancel();
afx_msg void OnOkCE2();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CALCULATE2DLG_H__365B406F_9EA1_494B_A07C_E551C14BA78C__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -