#include <iostream>
#include <list>
#include <numeric>
#include <algorithm>
using namespace std;
typedef struct pos
{
int x;
int y;
}pos;
typedef list<int> listpos;
int main(void)
{
list<listpos> alist;
listpos pos1;
pos1.push_back(1);
pos1.push_back(2);
listpos pos2;
for(int k=0; k<100; k++)
{
pos2.push_back(k);
}
alist.push_back(pos1);
alist.push_back(pos2);
list<listpos>::iterator i;
for(i=alist.begin(); i!=alist.end(); i++)
{
listpos::iterator j;
listpos list1 = listpos(*i);
for(j=list1.begin(); j!=list1.end(); j++)
{
cout << int(*j) << endl;
}
}
return 0;
}
#include <list>
#include <numeric>
#include <algorithm>
using namespace std;
typedef struct pos
{
int x;
int y;
}pos;
typedef list<int> listpos;
int main(void)
{
list<listpos> alist;
listpos pos1;
pos1.push_back(1);
pos1.push_back(2);
listpos pos2;
for(int k=0; k<100; k++)
{
pos2.push_back(k);
}
alist.push_back(pos1);
alist.push_back(pos2);
list<listpos>::iterator i;
for(i=alist.begin(); i!=alist.end(); i++)
{
listpos::iterator j;
listpos list1 = listpos(*i);
for(j=list1.begin(); j!=list1.end(); j++)
{
cout << int(*j) << endl;
}
}
return 0;
}