谁能给做个C++小程序?(紧急)

来源:百度知道 编辑:UC知道 时间:2024/06/15 20:33:49
不管有多小,但代码一定要有详细过程和注释,先给30分,如果答案好再补100,绝不食言!!~~~
一楼的朋友,我想要的是个EXE文件的,能不能做个稍难点的.....

二楼的朋友:我要交作业......你不是叫老师整死我吧

可能我说的夸张了....不要简单到A+B=C这种啊....晕哦

有个简单计算器的,有没有会做的噢???

我编的小型计算器程序,能计算普通+,-,*,/,和带括号的表达式,使用顺序栈的数据结构,程序如下:
//////////////////////////////////////////////
#include "iostream"
#include "string"
using namespace std;

//---------------------------------- Stack.h --------------------------
//定义Stack类
const maxsize=20;
enum Error_code { success, overflow, underflow };

template <class T>
class Stack {
public:
Stack();
bool empty() const;
bool full() const;
int size() const;
void clear();
Error_code top(T &item) const;
Error_code pop();
Error_code push(const T &item);
private:
int count;
T entry[maxsize];
};

template <class T>
Stack<T>::Stack() {
count=0;
}

template <class T>
bool Stack<T>::empty () const {
return count==0;
}

template <clas