I thought i would post to help others, this works with sfml 2.1 codeblocks c++
#include <SFML/Graphics.hpp>
#include <sstream>
int main()
{
sf::Font font;
font.loadFromFile("arial.ttf");
sf::Text text;
text.setFont(font);
text.setPosition(100,100);
text.setCharacterSize(34);
text.setColor(sf::Color::Red);
sf::Clock clock; // starts the clock
sf::Time elapsed1; // set time object
int intSecondsCounted;
std::stringstream ss;
sf::RenderWindow window(sf::VideoMode(800, 800), "Hag");
// run the main loop
while (window.isOpen())
{
// handle events
sf::Event event;
while (window.pollEvent(event))
{
if(event.type == sf::Event::Closed)
window.close();
}
elapsed1 = clock.getElapsedTime();
ss.str(std::string()); //clear the string
ss << elapsed1.asSeconds();
ss << std::endl << "Seconds Since I Started Counting";
text.setString( ss.str().c_str() );
window.draw(text);
window.display();
window.clear();
}
return 0;
}