Number of elements in a list of list

Hello everyone, I have a problem like this: I do not know how to count the number of elements in a list of lists. Let me explain:
I have the following list of list.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#define VAR(V, init) __typeof(init) V=(init)
#define FOR_EACH(I,C) for(VAR(I, (C).begin()), ite = (C).end();
                          (I) != ite; 
                          ++(I))
   
std::vector<std::vector<GLdouble> > contours;
   
   FOR_EACH( contour, contours )
  {
        gluTessBeginContour(tobj);

        for( size_t v = 0; v < contours.size() ; v += 3 )
            gluTessVertex(tobj, &(*contour)[v], &(*contour)[v]);

        gluTessEndContour(tobj);
  }

I do not know how to write the part indicated in Bold that represents the number of elements of contour.
Can you help me, I'm going crazy.
As seen from the code used for the tesselation OpenGL.
Nobody can help me?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#define VAR(V, init) __typeof(init) V=(init)
#define FOR_EACH(I,C) for(VAR(I, (C).begin()), ite = (C).end();
                          (I) != ite; 
                          ++(I))
   
std::vector<std::vector<GLdouble> > contours;
   
FOR_EACH( contour, contours )
{
        gluTessBeginContour(tobj);

        for( size_t v = 0; v < contour->size() ; v += 3 )
            gluTessVertex(tobj, &(*contour)[v], &(*contour)[v]);

        gluTessEndContour(tobj);
}
Thanks vlad
Topic archived. No new replies allowed.