.
.
string line;
vector<string>DataStore;
ifstream file;
file.open(fileName.c_str());
if (!file.is_open()){
cout<<"Error retrieving file " <<fileName<<endl;
}
while(getline(file,line))
{
getline(file,line);
stringstream lineStream(line);
string bit;
getline(lineStream, bit, ',');
getline(lineStream, bit, '\n');
DataStore.push_back(bit);
.
.
This piece of code takes a CSV and stores its data in a vector. The first column of the CSV contains a mix of numbers and words, the second column of the CSV contains numerical data only. How can I store the data from column one only?
Any help appreciated,
Thanks!