-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_encode.cpp
More file actions
43 lines (38 loc) · 920 Bytes
/
main_encode.cpp
File metadata and controls
43 lines (38 loc) · 920 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
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: main.cpp
* Author: Devin
*
* Created on March 28, 2016, 1:18 PM
*/
#include <cstdlib>
#include <iostream>
#include <string>
#include "ahencode.h"
/*
*
*/
int main(int argc, char** argv) {
std::string str;
std::shared_ptr<Tree> tree;
if (argc == 1) {
while (std::getline(std::cin, str)) {
tree = std::make_shared<Tree>(str);
tree->Build(argc);
}
}
else if (argc == 2) {
std::string string_argv = argv[1];
if (string_argv.compare("-s") == 0) {
while (std::getline(std::cin, str)) {
tree = std::make_shared<Tree>(str);
tree->Build(argc);
}
}
}
return 0;
}