My test file has data like this:
1
2
3
0
1, 2
3, 4
0, 0
4, 3
2, 1
0, 0
How would I separate the data by line but also separate each section of data by the zeros.
ifstream data("testData.txt");
string line, a, b;
while(getline(data,line))
{
stringstream str(line);
istringstream ins;
ins.str(line);
ins >> a >> b;
hold.push_back(a);
hold.push_back(b);
}
How do I separate them by the zeros?