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);
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);