Hi all,
i'm a new member for this forum. my problem is when i exit program by press ECS or click exit windows then i have error R6025 pure virtual function call.
i test again by remove code sf::String. My program don't have error when exit.
How to fix problem.
This is simple code from Tutorial
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics.hpp>
#include <iostream>
////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
// Create the main rendering window
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
// Load a font from a file
sf::Font MyFont;
if (!MyFont.LoadFromFile("cheeseburger.ttf", 50))
return EXIT_FAILURE;
// Create a graphical string
sf::String Hello;
Hello.SetText("Hello !\nHow are you ?");
Hello.SetFont(MyFont);
Hello.SetColor(sf::Color(0, 128, 128));
Hello.SetPosition(100.f, 100.f);
Hello.SetRotation(15.f);
Hello.SetSize(50.f);
// Process events
sf::Event Event;
// Start game loop
while (App.IsOpened())
{
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close();
// A key has been pressed
if (Event.Type == sf::Event::KeyPressed)
{
// Escape key : exit
if (Event.Key.Code == sf::Key::Escape)
{
App.Close();
}
// F1 key : capture a screenshot
if (Event.Key.Code == sf::Key::F1)
{
sf::Image Screen = App.Capture();
Screen.SaveToFile("screenshot.jpg");
}
}
}
// Clear the screen with red color
App.Clear(sf::Color(200, 0, 0));
App.Draw(Hello);
// Display window contents on screen
App.Display();
}
return EXIT_SUCCESS;
}
i develop on Windows 7 Ultimate/VC++ 2008