I have a user-defined structure like this:
struct Cell{
int dirty;
double data;
Cell* c;
// bool operator==(const struct Cell& other) {
// /* I am not sure if I need this function here...*/
// }
};
Then, I defined a list like this:
list<Cell> cell_list;
What I want to do is to delete any elements in "cell_list" that satisfy the condition
(certain_cell.dirty == 1)
Could anybody give me some instructions on how to effectively realize the above operations?