I'm not really sure how the ordering works yet, but since the grouping is significant one way is to add another dimension.
Code:
typedef vector<int> group;
vector<group> classes;
{
int a[] = {1,1,2,2};
int b[] = {1,2,2,2,3,3,4,5};
classes.push_back(group(a, a + sizeof(a) / sizeof(a[0])));
classes.push_back(group(b, b + sizeof(b) / sizeof(b[0])));
}
C++11 has something called initializer lists that makes this a lot less tedious. It would not surprise me if this worked:
Code:
typedef vector<int> group;
vector<group> classes{ {1,1,2,2}, {1,2,2,2,3,3,4,5}};