我有一个这样的用户定义结构:
struct Cell{
int dirty;
double data;
Cell* c;
// bool operator==(const struct Cell& other) {
// /* I am not sure if I need this function here...*/
// }
};
然后,我定义了一个这样的列表:
list<Cell> cell_list;
我想要做的是删除“cell_list”中满足条件的所有元素
(certain_cell.dirty == 1)
谁能给我一些关于如何有效实现上述操作的指导?