-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
56 lines (42 loc) · 1002 Bytes
/
Copy pathmain.cpp
File metadata and controls
56 lines (42 loc) · 1002 Bytes
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
#include <iostream>
#include "MatchingEngine.h"
using namespace std;
int main()
{
MatchingEngine engine;
int choice;
while (true)
{
cout << "\n===== LIMIT ORDER BOOK ENGINE =====\n";
cout << "1 Place Buy Order\n";
cout << "2 Place Sell Order\n";
cout << "3 Show Order Book\n";
cout << "4 Show Trade History\n";
cout << "5 Market Statistics\n";
cout << "6 Exit\n";
cout << "Choice: ";
cin >> choice;
switch (choice)
{
case 1:
engine.placeBuyOrder();
break;
case 2:
engine.placeSellOrder();
break;
case 3:
engine.showOrderBook();
break;
case 4:
engine.showTrades();
break;
case 5:
engine.showMarketStats();
break;
case 6:
return 0;
default:
cout << "Invalid choice\n";
}
}
}