17 #ifndef __CSV_FILE_READER__
18 #define __CSV_FILE_READER__
24 #include <boost/assert.hpp>
30 #include <boost/algorithm/string.hpp>
39 std::string seperator;
43 : fileName(filename), seperator(sep) {}
45 std::vector<std::vector<std::string> > readCSV() {
46 std::ifstream file(fileName.c_str());
47 std::vector<std::vector<std::string> > dataList;
48 std::string line =
"";
49 while (getline(file, line)) {
50 std::vector<std::string> vec;
51 boost::algorithm::split(vec, line, boost::is_any_of(seperator));
52 dataList.push_back(vec);
A helper class to read CSV files.