-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
30 lines (29 loc) · 848 Bytes
/
main.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
#include <iostream>
#include "parser.h"
using namespace std;
int main(int argc, char** argv) {
std::list<std::list<string>*>* data;
string fdir = "test-q.csv";
if(argc==2) {
fdir = argv[1];
}
cout << "Parsing: "<<fdir;
Parser p(fdir);
cout << "\nHorizonal mode: \n"<<endl;
data = p.parse();
for(auto it=data->cbegin(); it!=data->cend(); it++) {
for(auto jt=(*it)->cbegin(); jt!=(*it)->cend(); jt++) {
cout << (*jt) << " ";
}
cout << endl<<"----------"<<endl;
}
cout << "\nVertical mode: \n"<<endl;
data = p.parse_vertical();
for(auto it=data->cbegin(); it!=data->cend(); it++) {
for(auto jt=(*it)->cbegin(); jt!=(*it)->cend(); jt++) {
cout << (*jt) << " ";
}
cout << endl<<"----------"<<endl;
}
return 0;
}