void Button::checkClick(sf::Vector2f mousePos) {
this->&getSprite().getGlobalBounds().contains(mousePos); /*error here I can't deference the pointer to my sprite to call this function*/
}
//currentSpr is a pointer to the current sprite being used by my button
sf::Sprite* Button::getSprite() {
return currentSpr;
}
My question is how can I implement my check click function / how can I fix this error