本计算器的代码在C+builder下完成,利用了大学里面学习的后缀表达式运算的功能,本人完善了计算器后面的一部分,希望对学习数据结构的各位同学有所帮助。也希望大家将开源的精神进行到底。软件界面如下
运算后的界面如下:
#include"stdio.h"
typedef char EC;typedef double ED;
#include"math.h"
#define little 1e-8
#define STACK_INIT_SIZE 100
#include"stdio.h"
#include <fstream>
#include <iostream>
typedef double EEE;
#define STACK_INIT_SIZE 100
using namespace std;
//实数栈
//实数栈
typedef struct{
EC * cha;
ED * dou;
int stacksize;
int top;
}SqStack;
//虚数栈
typedef struct{
char f;
double k;
}suff; <