Following question [Segmentation fault executing method](https://stackoverflow.com/questions/10166462/segmentation-fault-executing-method) I stopped in another problem.

Given:

```
Cluster * base;
Cluster * absorbed;

list<Cluster>::iterator li = clusters.begin();

// li is then pointed to some element.

absorbed = &(*li);   // Get a pointer to the chosen element.

base->joinCluster(absorbed);   // Perform an action with absorbed.

// li contines the cycle and now point to clusters.end()

// Now, absorbed should be deleted from list. li doesn't point to absorbed anymore.
li = & (* absorbed);
clusters.erase(li);

```

Tried to do the reverse of above, but g++ returns an error: `error: no match for 'operator=' in 'li = absorbed'`
How can I do this?

I'm trying to avoid to cycle through all the elements in the list to find again the `absorbed` one.

**Edit:**

Sorry, but i understand I missed to say that after `absorbed = &(* li);` `li` continues to cycle until `clusters.end()`.
So, at the time the cycle ends, `li` doesn't point to `absorbed` anymore.
I think I have two option: Either I cycle again through all elements in `clusters` to find the `absorbed` element; Or I take advantage of the `absorbed` pointer to erase the element from `clusters`. But, how can I achieve this second option?