-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
82 lines (66 loc) · 1.4 KB
/
main.cpp
File metadata and controls
82 lines (66 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#include "Input.h"
#include "Symbol.h"
#include <stack>
#include "ToPostfix.h"
#include "Output.h"
#include <sstream>
#include <iostream>
using namespace std;
int main() {
/*
//* String Test
string a = " 12_+";
stringstream test;
double b;
test<<a;
test>>b;
std::cout<<b-1;
*/
//stack<string,deque<string> > stk;
// stk.pop();
Input test;
test.GetString();
//test.Display();
//test.Check();
ToPostfix t1(test.ReturnString());
t1.InfixtoPostfix();
t1.Display();
Output t2(t1.ReturnString());
t2.Calculate();
t2.Display();
// t1.Display();
//Output o(t1.ReturnString());
//Output T("2.5 2.5 *");
//T.Calculate();
//T.Display();
// o.Display();
/*
//stack<string,deque<string> > stk; //stack initialize
//stack stk;
/*
stk.push("=");
stk.push("+");
cout<<stk.top()<<endl;
stk.pop();
cout<<stk.top()<<endl;
//string::iterator b=(a.end()-1);
//cout<<*b<<endl;
//int a;
const string a = "-++-1.9()__" ;
const string::const_iterator i = a.begin();
cout<<*i;
string aa;
aa = a.substr(4);
cout<<aa<<endl;
double b = str2num(a);
double d = atof(a.c_str());
double dd;
stringstream d;
d<<a;
d>>dd;
cout<<dd+1<<endl;
//a.append(stk.top());
cout<<a<<endl;
*/
return 0;
}