-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstringifier.cpp
More file actions
35 lines (28 loc) · 784 Bytes
/
stringifier.cpp
File metadata and controls
35 lines (28 loc) · 784 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
#include "btree.h"
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char **argv)
{
int minimum_degree, input_size;
vector<int> input_stream;
cout << "BTree Stringifier: See string representation of a BTree<int>" << endl;
cout << "-------------------------------------------------------" << endl;
cout << "Enter minimum_degree(t) of BTree: ";
cin >> minimum_degree;
cout << endl;
cout << "Enter size of input stream: ";
cin >> input_size;
cout << endl;
cout << "Enter input(int) to construct the BTree: ";
for (int i = 0; i < input_size; i++)
{
int e;
cin >> e;
input_stream.push_back(e);
}
cout << endl;
btree::BTree btree{minimum_degree, input_stream};
cout << btree.toString() << endl;
return 0;
}