I can not tell you for sure why you get the flickering problem, but the tutorial states (as far as I can remember) that the only true way to draw stuff in SFML is the clear - draw - display cycle.
//Edit: This as of now has already been pointed out by someone.
My personal approach to keeping multiple objects inbetwen rendering cycles would be to store them in a vector and draw each object again each frame.
And instead of using sleep, consider accumulating delta times and only create a new triangle when one second has passed (and then reset the total time). Check sf::Time, sf::Clock.
You don't need stdafx.h and Windows.h, use en empty project.
I have not worked that much with vertex arrays yet myself, but they might improve performance in comparison to using sf::CircleShape for triangles (but I really can't guarantee that).
I hope that my suggestions may help you. Perhaps someone else has better ones.