So, I define a std::list to store pointers to a “Point” class as follows…

list<Point*> m_pointList;

If I then want to add to the list I do…

Point* p = new Point(x, y);
m_pointList.push_back(p);


Discover more from

Subscribe to get the latest posts sent to your email.

Leave a comment

Trending