Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - yasser

Pages: [1]
1
Graphics / Re: expected primary expression when using a pointer
« on: July 01, 2019, 01:24:21 pm »
that fixed it, thanks

2
Graphics / expected primary expression when using a pointer
« on: July 01, 2019, 12:48:14 am »
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:
Quote
*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:

Quote
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);
}

Pages: [1]