What have I missed?
For the forum post, you're missing code=cpp or code=none tags to format your code properly.
For the problem:
main.cpp:19:15: error: cannot declare variable 'poly' to be of abstract type 'sf::Shape'
And if you don't know what an abstract class is, then you've missed some basic C++ knowledge, which is not a bad thing, since there are
good books about C++, of which you can learn things.
Ah and you've probably also missed the documentation.
Base class for textured shapes with outline.
sf::Shape is a drawable class that allows to define and display a custom convex shape on a render target.
It's only an abstract base, it needs to be specialized for concrete types of shapes (circle, rectangle, convex polygon, star, ...).