-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
42 lines (35 loc) · 870 Bytes
/
main.cpp
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
#include <iostream>
#include "tree.h"
using namespace std;
/*
void menu() {
system("cls");
cout<<"==========================================================="<<endl;
cout<<"\t\tPractica Operaciones"<<endl;
cout<<"==========================================================="<<endl;
//char* str="7/4*((a+b)*a)+3";
//char* str="7/4*((a+-+--b)*a)+3";
//char* str="2+(3)";
char* str="7/4*((a+b)^4*a)+3";
}
void
int main(int argc, char const *argv[]) {
menu();
cout << "\nPress enter to continue ...";
cin.get();
return EXIT_SUCCESS;
}*/
// Faltan operaciones grandes, variables, operadores unarios
int main(int argc, char const *argv[]) {
string equation;
if (argc == 2) {
equation = argv[1];
}
else {
throw "One argument expected";
}
tree Tree;
Tree.constructTree(equation);
cout << endl;
return 0;
}