I have my function and I am filling targetBubble there, but it is not filled after calling this function, but I know it was filled in this function because I ha
targetBubble
You are passing the pointer by value.
Pass a reference to the pointer if you want it updated.
bool clickOnBubble(sf::Vector2i& mousePos, std::vector bubbles, Bubble *& t)