a b
00001 3
00002 2
00003 1 4
00004 2 4 5
00005 1 2
00006 1 2 4
00007 2 5
00008 3 4 5
00009 3 4 5
00010 2 3
This is my data, I open it in C++ with getline and I wish to split them into a 2D vector. wish to have a 10*2 array which first column is a and second column is b. What should I do?
This is my code
int row = 0;
int column = 2;
string line;
vector<vector<string>>info;
ifstream data("C:\\01_test.txt");
while (getline(data, line))
{
row++;
}
data.close();