no i write code one by one here its my code
#include <SFML\Graphics.hpp>
#include <SFML\Audio.hpp>
using namespace sf;
int main(){
// First create main window
RenderWindow window(VideoMode(800, 600), "SFML Window");
//load texture
Texture texture;
if (!texture.loadFromFile("E:\img.jpg"));
Sprite sprite(texture);
return EXIT_FAILURE;
//create graphical text
Font font;
if (!font.loadFromFile("E:\font.TTF"));
return EXIT_FAILURE;
Text text("HELLO SFML", font, 50);
//load music
Music music;
if (!music.openFromFile("E:\nice_music.ogg"));
return EXIT_FAILURE;
//play music
music.play();
// Start the game loop
while (window.isOpen())
{
// Process events
Event event;
while (window.pollEvent(event))
{
// Close window: exit
if (event.type == Event::Closed)
window.close();
}
window.clear();
window.draw(sprite);
window.draw(text);
window.display();
}
return EXIT_SUCCESS;
}