ha************@yahoo.fr wrote:

Hi everyone,

Here about what it is.

vector<vector<Point3D> > pVector0;

pVector0 is a vector of vector of 3D points.

pVector0[i] is a vector of 3D points.

pVector0[i][j] is a 3D point.

I wanted to add a point pt3D to the m vector in pVector0,

Are you sure this 'm' vector exists?

I have

write these two instructions which belong to a C++ program.

vector< vector<Vector3D> > pVector0;

pVector0[m].push_back(pt3D);

If that's the only 2 lines you wrote, there's a problem. The vector is

empty and you are trying to access it's mth element. Illegal.

If you want to add a point, you first need to add a vector of points.

std::vector<Vector3D> vector_of_points;

vector_of_points.push_back(a_point);

pVector0.push_back(vector_of_points);

Remember: pVector0 is a vector of vectors of points.

Jonathan