Jan 16, 2012 at 7:43am UTC
In SFML
sf::Shape::Circle returns a
sf::Shape .
Here's the line of code giving me an error:
sf::Drawable* cl = new sf::Shape::Circle(0, 0, 10, bColor, 1, fColor);
These are the errors it gives me:
error: expected type-specifier
error: cannot convert 'int*' to 'sf::Drawable*' in initialization
error: expected ',' or ';'
I think I'm missing something very fundamental here.
Last edited on Jan 16, 2012 at 7:49am UTC
Jan 16, 2012 at 8:25am UTC
Circle is a function that returns a Shape. The argument of new has to be a type. You could do
sf::Drawable* c1 = new sf::Shape(sf::Shape::Circle(...));
Jan 16, 2012 at 8:53am UTC
Oh ok, I'll have to remember that, thanks.