Below code is to get some data from csv file. But the result is showing as follow:
5,Jones,123-123-1234,BCBS,GP1234,39,Sarah,Broken Arm,3
6,Smith,123-231-1234,UHC,G1234,47,Francine,Physical Therapy,03/25/2015
9,Adams,123-123-4321,Cigna,U1234,28,Bob,Broken Arm,2
5,Van Gogh,123-321-1234,BCBS,GP1235,37,Andrea,Tummy Ache,3
10,Pewterschmidt,123-312-1234,UHC,G1112,42,Peter,Supervision normal first pregnancy,03/26/2015
But I want to get the data except first column(such as 5,6,9,5,10) How can I do that? Could you give me an idea? Thanks.
void Hospital::readRecordsFile()
{
fileName = "Waterbury Hospital patients records.csv";
ifstream file(fileName);
string value;
vector <string> getInform;
while(file.good())
{
getline(file, value);
getInform.push_back(value);
//getInform.erase(getInform.begin()+1);
}
for(int i=0;i<getInform.size();i++)
{
cout << getInform[i] << endl;
}
}