JustPaste.it
#include <SFML/Graphics.hpp>
#include <iostream>
#include <windows.h>
 
using namespace sf;
using namespace std;
 
void close(RenderWindow window){
    window.clear();
    Font Arial;
    if (!Arial.loadFromFile("arial.ttf")){
    cout<<"Error loading fonts.";
    }
    Text close("Are you sure you want to close this?", Arial);
    window.draw(close);
    close.setCharacterSize(40);
    close.setPosition(300, 300);
    window.display();
};
 
int main()
 
{
 
    // Create the main window
    sf::RenderWindow app(sf::VideoMode(800, 600), "SFML window");
 
    ShowWindow(GetConsoleWindow(), SW_HIDE);
 
    // Load a sprite to display
    sf::Texture texture;
    if (!texture.loadFromFile("cb.bmp"))
        return EXIT_FAILURE;
    sf::Sprite sprite(texture)
    //Code::Blocks generated image
 
    Font Arial;

 

    if (!Arial.loadFromFile("arial.ttf")){
        cout<<"Error loading fonts.";
        return EXIT_SUCCESS;
    }
 
    Text text("Codeblox", Arial);
 
// Start the game loop
    while (app.isOpen())
    {
        // Process events
        sf::Event event;
        while (app.pollEvent(event))
        {
            // Close window : exit
            if (event.type == sf::Event::Closed){
                close(app);
            }
 
        }
 
        // Clear screen
        app.clear();
 
        // Draw the sprite
        app.draw(sprite);
        app.draw(text);
        text.setPosition(500, 500);
 
        // Update the window
        app.display();
    }
 
    return EXIT_SUCCESS;
}