0 Members and 1 Guest are viewing this topic.
#include <sstream>std::ostringstream output;std::cerr.rdbuf(output.rdbuf());if (!image.LoadFromFile("...")){ std::string error = output.str();}
#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; }