forked from mayaanayak/OpenFlightsGraphAlgorithms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparseDat.h
More file actions
20 lines (17 loc) · 637 Bytes
/
parseDat.h
File metadata and controls
20 lines (17 loc) · 637 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once
#include <iostream>
#include <vector>
#include <string>
using std::vector;
using std::string;
class parseData {
public:
parseData();
vector<vector<string>> getDataVector(string file); //convert a string file to a vector of type string
private:
void fileToVect(const string& file); //parse a csv file to a vector of type string
void vectorToTwoDimension(); //convert vector from fileToVect into two-dimensions
vector<string> splitString(string str); // split a string using "," delimiter
vector<string> csvVector;
vector<vector<string>> csvInTwoDimension;
};