摘要: #include #include using namespace std; template struct Node { Type data; Node*next; }; template class Stack { private: Node*head; public: //构造函数 Stack() { head = new Node; head->next = NU... 阅读全文
posted @ 2016-10-08 23:45 KennyRom 阅读(142) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; //优先级判断 char compare(char opt, char si) { if((opt=='+'||opt=='-')&&(si=='*'||si=='/') return ''; } //判断是否为运算符 bool isOp(char c) { if(c=='+'||c=='... 阅读全文
posted @ 2016-10-08 23:13 KennyRom 阅读(193) 评论(0) 推荐(0) 编辑