?? calculation.h
字號:
// Calculation.h: interface for the CCalculation class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CALCULATION_H__31FA6E9E_9C47_429B_8552_69F2FE2EBA36__INCLUDED_)
#define AFX_CALCULATION_H__31FA6E9E_9C47_429B_8552_69F2FE2EBA36__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Calculation.h"
class CCalculation
{
public:
void Dec2Bin(CString *strExp);
void Dec2Oct(CString *strExp);
CCalculation();
virtual ~CCalculation();
bool m_bDegree;
int m_nOutputFlag;//=0 十進制輸出;=1 十六進制輸出;=2 八進制輸出;=3 二進制輸出
CString MainPro(CString strExp,double x); //*主處理函數*
void Dec2Hex(CString *strExp);
double StoN(CString str); //*字串轉數字*
CString NtoS(double d); //*數字轉字串*
private:
void Calcu(CString *strExp,int pos); //*二元運算的預處理函數*
void Macro(CString *strExp); //*常數宏代換*
void Oct2Dec(CString *strExp); //*處理8進制數*
void Bin2Dec(CString *strExp); //*處理2進制數*
void Hex2Dec(CString *strExp); //*處理16進制數*
void MultiE(CString *strExp); //*多元運算*
void MinusMinus(CString *strExp); //*處理負負得正*
void DelBracket(CString *strExp); //*用計算結果替換表達式*
bool SynRes(CString *strExp); //*判斷表達式是否合法*
CString ModiResult(CString strRes); //*在格式上處理最后的計算結果*
CString SingleE(CString op,double dx); //*一元運算*
CString TwoE(CString strExp); //*二元運算*
CString opt1[6];
CString opt[15];
CString m_strConName[15];
CString m_strConValue[15];
CString m_strTmp;
bool IsDigital(CString str); //*判斷表達式中是否有函數或運算符*
int BraCheck(CString str); //*計算左右括號的差值*
int LocateLBra(CString strExp); //*定位最后一個左括號*
CString DeleteChar(CString str,int pos,int NUM);
char opt2[6];
protected:
};
#endif // !defined(AFX_CALCULATION_H__31FA6E9E_9C47_429B_8552_69F2FE2EBA36__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -