okay i know what you mean but my problem isn't that pointer, believe me ^^
here the programm without that pointer:
#include <iostream>
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
using namespace std;
int main()
{
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Window");
sf::Image Image;
if(!Image.LoadFromFile("sprite.png"))
{
cout<<"Sprite konnte nicht geladen werden"<<endl;
}
sf::Sprite Sprite(Image);
Sprite.SetPosition(0, 0);
while(App.IsOpened())
{
sf::Event Event;
while(App.GetEvent(Event))
{
if(Event.Type == sf::Event::Closed || (Event.Type==sf::Event::KeyPressed && Event.Key.Code == sf::Key::Escape))
{
App.Close();
}
}
App.Clear();
App.Draw(Sprite);
App.Display();
}
return EXIT_SUCCESS;
}
You meant i should do it light this, dint't you?
Now the programms working brilliantly, just when i close it by esp or clicking on the X, it's hanging up. With that pointer i just wanted to test if it's the sprite's fault or not. So I think it's the destructor of the sprite or smilar.
I hope you know now what's my problem ^^