- // fff.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include "windows.h"
- #include "formula.h"
- int main(int argc, char* argv[])
- {
- char ss[1000];
- formula fm;
- double tt;
- fm.caculate("22+5-");
- if(fm.getformulaVar(&tt))
- MessageBox(0,"表达式有错误","错误",0);
- else
- {
- sprintf(ss,"%f",tt);
- MessageBox(0,ss,"计算结果",0);
- }
- // getchar();
- return 0;
- }