Hi.
sf::Shape * genSquare = new sf::Shape::Rectangle(0,0,100,100,sf::Color::Red);
This will not compile for me. I get an "expected type-specifier" error.
Any thoughts?
I need it to be a pointer else it will go out of scope for the other object I am using it for and thus cause a bad access.
EDIT: sf::Shape::Rectangle is not a constructor, it's a static function, so I
need to type it.
The correct code is this:
sf::Shape * genSquare = new sf::Shape(sf::Shape::Rectangle(0,0,100,100,sf::Color::Red));