標(biāo)準(zhǔn)C++算數(shù)表達(dá)式算法

字號(hào):

考試大編輯整理C++編程知識(shí)
    標(biāo)準(zhǔn)C++算數(shù)表達(dá)式算法
    #include
    #include
    #include
    #include
    #include
    using namespace std;
    string Postfix_Expression;
    vector StoreData;
    vector StoreOper;
    vector StoreQueue;
    stack < double, vector > Data_Stack(StoreData);
    stack < char, vector > Oper_Stack(StoreOper);
    stack < double, vector > Queue_Stack(StoreQueue);
    inline int Priority( char );
    void Make_The_Postfix_Stack();
    void Calculate_The_Postfix_Stack();
    int main(int argc, char * argv[])
    {
    Make_The_Postfix_Stack();
    Calculate_The_Postfix_Stack();
    system(\"pause\");
    return 0;
    }
    void Make_The_Postfix_Stack()
    {
    size_t Index = 0;
    string Scrstr;
    string Buffer;
    string Check(\".0123456789(+-*/)#\");
    char Space;
    char Char_Temp;
    double Double_Temp;
    Oper_Stack.push(’#’);