-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTrainMain.cpp
More file actions
130 lines (130 loc) · 2.62 KB
/
TrainMain.cpp
File metadata and controls
130 lines (130 loc) · 2.62 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
//#include "Train.h"
//#include <vector>
//#include<conio.h>
//#include<Windows.h>
//
//int main()
//{
// vector<Train> trains;
//
// char ch;
// do {
// system("cls");
// cout << "Menu:\n";
// cout << "1 - dodatu poizd u rocklad.\n";
// cout << "2 - drykyvatu informaciu pro vsi poizdu.\n";
// cout << "3 - drykyvatu informaciu pro shykanui nomer poizda.\n";
// cout << "4 - drykyvatu informaciu pro poiz, sho ide do shykanui stancii.\n";
// cout << "0 - vuhid.\n";
// ch = _getch();
// Sleep(1000);
// switch (ch)
// {
// case '1':
// {
// system("cls");
// cout << "Vvedit nomer poizda: \n";
// int numberTrain;
// cin >> numberTrain;
//
// cout << "Vvedit chas vidpravlennia: \n";
// cout << "Godunu:\n";
// int h;
// cin >> h;
// while (h < 0 || h>24)
// {
// cout << "Nevirnui vvod. Vvedit goduny vidpravlennia: \n";
// cin >> h;
// }
// cout << "hvulunu:\n";
// int min;
// cin >> min;
// while (min < 0 || min>60)
// {
// cout << "Nevirnui vvod. Vvedit hvulunu vidpravlennia: \n";
// cin >> min;
// }
// cin.ignore();
// cout << "Vvedit stanciiu: \n";
// string strStation;
// getline(cin, strStation);
//
//
// Train train(numberTrain, h, min, strStation);
// trains.push_back(train);
//
// Sleep(000);
// break;
// }
//
// case '2':system("cls");
// if (trains.size() != 0)
// {
// for (auto& n : trains)
// {
// n.Print();
// cout << "-------------------------------------------------\n";
// }
// }
// else
// cout << "Rozklad poizdiv pyst.\n";
// system("pause");
// break;
//
// case '3':
// {
// system("cls");
// if (trains.size() != 0)
// {
// bool f = false;
// cout << "Vvedit nomer poizda dlyia poshuka: \n";
// int findNumber;
// cin >> findNumber;
// for (auto& n : trains)
// {
// if (n.getNumber() == findNumber)
// {
// n.Print();
// f = true;
// break;
// }
// }
// if (f == false)
// cout << "Takogo poizda nema.\n";
// }
// else
// cout << "Rozklad poizdiv pyst.\n";
// system("pause");
// break;
//
// }
// case '4':
// {
// system("cls");
// if (trains.size() != 0)
// {
// bool f = false;
// cout << "Vvedit nazvu stancii dlyia poshuka: \n";
// string findStation;
// getline(cin, findStation);
// for (auto& n : trains)
// {
// if (n.getStation() == findStation)
// {
// n.Print();
// f = true;
// break;
// }
// }
// if (f == false)
// cout << "Takogo poizda nema.\n";
// }
// else
// cout << "Rozklad poizdiv pyst.\n";
// system("pause");
// break;
//
// }
// }
// } while (ch != '0');
//}