Next time you post a compiler error, can you please post the full error and indicate what line the error is on. Just because the error have information you don't understand, doesn't mean it's irrelevant.
Fortunately, in this case, the error is obvious from what you've posted.
But before you do that, you create a local container in function regresaPunto. Then you create an iterator that points to somewhere in the collection. Then you return the address of that iterator, knowing that the container and the iterator will be destroyed when that function exits.
The value the function returns points to an object that no longer exists, right?
You have to post a bit more code. What is P, and how is it used? What information do you want out of regresaPunto?