SFML community forums
Help => Graphics => Topic started by: Ptlomej on February 21, 2012, 03:38:57 pm
-
Using SFML 1.6
Visual C++
sf::Shape S1 = sf::Shape::Circle(sf::Vector2f(X,Y),sf::Randomizer::Random(2,20),sf::Color::White);
sf::Shape *S2 = new [u]sf::Shape::Circle[/u](sf::Vector2f(X,Y),sf::Randomizer::Random(2,20),sf::Color::White);
The underline is the Error ?
-
sf::Shape::Circle is not a type, it's a function. The result is always a sf::Shape.
sf::Shape *S2 = new sf::Shape;
*S2 = sf::Shape::Circle(sf::Vector2f(X,Y),sf::Randomizer::Random(2,20),sf::Color::White);
-
Thank you i doesnt know that but now works fine ;)