-
Notifications
You must be signed in to change notification settings - Fork 3
/
run.cpp
63 lines (49 loc) · 1.26 KB
/
run.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include<iostream>
#include<unistd.h>
#include<cstdlib>
#include<fstream>
using namespace std;
int main()
{
system("g++ setup.cpp -std=c++11 -o setup.o");
system("./setup.o");
system("gnome-terminal -e 'firefox index.html'");
cout<<"\nsetup.cpp successfully executed"<<endl;
int s,d;
cout<<"\nEnter the source and Destination:-";
cin>>s>>d;
cout<<s<<" "<<d<<endl;
ofstream fout;
fout.open("map.txt",ios::app);
fout<<s<<" "<<d;
fout.close();
system("g++ floyd.cpp -std=c++11 -o floyd.o");
system("mv init.dot.png test");
int k=1;
for(int i=0;i<3;i++)
{
fout.open("count.txt");
fout<<k;
fout.close();
system("g++ newRoad.cpp -std=c++11 -o newRoad.o");
system("./newRoad.o < map.txt");
k++;
system("./floyd.o <map.txt");
usleep(9000000);
system("g++ refresh.cpp -std=c++11 -o refresh.o");
cout<<"\nrefresh compiled";
system("./refresh.o <map.txt");
cout<<"\nmap refresed successfully"<<endl;
}
// One Last time collet data and update data.txt
fout.open("count.txt");
fout<<k;
fout.close();
system("g++ newRoad.cpp");
system("./a.out < map.txt");
system("cd test");
system("mv test/init.dot.png test/../");
system("cd ..");
system("g++ suggestNewRoad.cpp -std=c++11 -o suggestNewRoad.o");
system("./suggestNewRoad.o");
}