title: gdb: Could not find operator[]
body: <p>i'm developing in codeblocks and I have the following:</p>
  
  <pre><code>struct intersectionData_t
  {
      unsigned int idxOfBlob;
      unsigned int idxOfRoad;
      ofPoint xPt; //interesection (cross) point
  };
  
  typedef vector&lt;intersectionData_t&gt; plineXD_t;
  
  vector&lt;plineXD_t&gt; plinesXData;
  </code></pre>
  
  <p>basically, each polyline has a vector of intersections registered in <code>plineXD_t</code>. Then <code>plinesXData</code> is just the vector of all the polylines.</p>
  
  <p>in my implementation:</p>
  
  <pre><code>plineXD_t xData = findIntersectionData( trackedBlob , origRoads[i] );
  if ( !xData.empty() ) 
      plinesXData.push_back( xData );
  </code></pre>
  
  <p>I get some weird values from <code>plinesXData[i]</code> later on in the code so I am trying to see what is generated here in <code>xData</code>.</p>
  
  <p>when the watch in codeblocks returns <code>xData[0] : Could not find operator[].</code>
  same if I try plinesXData[i][0].</p>
  
  <p>EDIT: <code>xData.size()</code> does not return a number (the watch field is empty).</p>
  
  <p>EDIT2: findInterestionData fills in the vector intersectionData_t with the all intersection points <code>xPt</code> found between 2 polylines. It also stores the indices <code>idxOfRoad &amp; idxOfBlob</code> of the points just before an intersection for each polyline for quick access.</p>
  
  <pre><code>path::plineXD_t path::findIntersectionData( \
              const ofPolyline&amp; trackedBlob , const ofPolyline&amp; road)
  {
      plineXD_t xD;
  
      //for all line segments of path...
      for (unsigned int i = 0 ; i &lt; road.size()-1 ; i++)
      {
          //...test all line segs of trackedBlob for intersections
          for (unsigned int j = 0 ; j &lt; trackedBlob.size()-1 ; j++)
          {
              ofPoint intersectionPoint = ofPoint(0,0);
  
              if (ofLineSegmentIntersection(road[i] , road[i+1] , trackedBlob[j] , trackedBlob[j+1] , intersectionPoint ))
              {
                  struct intersectionData_t id;
                  id.idxOfRoad = i;
                  id.idxOfBlob = j;
                  id.xPt = intersectionPoint;
  
                  xD.push_back( id );
              }
          }
      }
  
      return xD;
  }
  </code></pre>
  
  <p>what is this ? how can I see the values of the xData vector?</p>