1
Graphics / [solved] sf::Image::LoadFromFile get error text
« on: April 18, 2011, 09:37:43 pm »
Just a little modification for people that may look for an answer later : std::cerr was not the correct stream. Here is the code with the good one for SFML errors :
Thanks a lot for the help.
Code: [Select]
#include <SFML/System.hpp>
[...]
std::ostringstream output;
sf::Err().rdbuf(output.rdbuf());
if (!image->LoadFromFile("..."))
{
std::string error = output.str();
std::cout<< "erreur!"<<error <<std::endl;
}
Thanks a lot for the help.