forked from d99kris/rapidcsv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ex006.cpp
executable file
·27 lines (24 loc) · 1.09 KB
/
ex006.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
#if 0
TMP=$(mktemp -d)
c++ -std=c++11 -I src -o ${TMP}/a.out ${0} && ${TMP}/a.out ${@:1} ; RV=${?}
rm -rf ${TMP}
exit ${RV}
#endif
#include <iostream>
#include <vector>
#include "rapidcsv.h"
int main()
{
rapidcsv::Document doc("examples/colrowhdr.csv", rapidcsv::LabelParams(0, 0));
std::cout << doc.GetCell<std::string>("Volume", "2017-02-22") << std::endl;
std::cout << doc.GetCell<int>("Volume", "2017-02-22") << std::endl;
std::cout << doc.GetCell<long>("Volume", "2017-02-22") << std::endl;
std::cout << doc.GetCell<long long>("Volume", "2017-02-22") << std::endl;
std::cout << doc.GetCell<unsigned>("Volume", "2017-02-22") << std::endl;
std::cout << doc.GetCell<unsigned long>("Volume", "2017-02-22") << std::endl;
std::cout << doc.GetCell<unsigned long long>("Volume", "2017-02-22") << std::endl;
std::cout << doc.GetCell<float>("Volume", "2017-02-22") << std::endl;
std::cout << doc.GetCell<double>("Volume", "2017-02-22") << std::endl;
std::cout << doc.GetCell<long double>("Volume", "2017-02-22") << std::endl;
std::cout << doc.GetCell<char>("Volume", "2017-02-22") << std::endl;
}