i have a sprite and a pointer with the sprite's adress,but everytime i try to access the sprite to modify it i get
"expected primary expression before ' . ' token"
here is my code:
*bmp_ptr = sf::Sprite.setRotation(); //error here
bmp_gun.setPosition(sf::Vector2f(110.f,50.f));
class_window.draw(bmp);
class_window.draw(bmp_gun);
and here is the declaration:
vehicles::vehicles(sf::RenderWindow& window)
:class_window(window)
{
sf::Sprite bmp;
sf::Sprite bmp_gun;
sf::Texture bmp_texture;
sf::Texture bmp_gun_texture;
bmp_ptr = &bmp;
bmp_texture.loadFromFile("bmp.png");
bmp_gun_texture.loadFromFile("bmp turret.png");
bmp_gun.setTexture(bmp_gun_texture);
bmp.setTexture(bmp_texture);
}