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