sf::VertexArray lines(sf::LinesStrip, m_Verts.size()+1);
std::vector<sf::Vector2<float> >::const_iterator it = m_Verts.begin();
for(;it!=m_Verts.end();++it) {
lines.append(sf::Vertex(*it, sf::Color(255,255,255,255)));
}
lines.append(sf::Vertex(m_Verts[0], sf::Color(255,255,255,255)));
target.draw(lines);
and m_Verts is fed like this
m_Verts.push_back(sf::Vector2f(10,10));
m_Verts.push_back(sf::Vector2f(110,10));
m_Verts.push_back(sf::Vector2f(110,110));
m_Verts.push_back(sf::Vector2f(10,110));
This example out of context may seem like a detour though