I have the following two structs that I use to define a line:
struct Point{
    double x;
    double y;
};
struct Line {
    unsigned int n_points;
    std::vector<Point> points;
};
I would like to iterate through the points vector after adding some data. I tried
int main(){
    Line line;
    // add some data to points vector with `push_back`
    // print content of `points`
    iter = line.points.begin();
    for(; iter != line.points.end(); ++iter){
        std::cout << iter.x << " " << iter.y << std::endl;
    }
}
This, however, does not work. Can someone explain me why?
 
     
    