-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.cpp
More file actions
32 lines (25 loc) · 746 Bytes
/
Copy pathexample.cpp
File metadata and controls
32 lines (25 loc) · 746 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
#include <tabular_parser/parser.h>
#include <iostream>
#include <list>
using namespace std;
int main(){
std::list<std::list<string>*>* data;
Parser p("test.csv");
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;
}