Bonjour a tous,
j'ai un souci lors de l'exécution d'un code d'exemple sous VS team system 2008 : "Stack arround the variable App was corrupted".
Je vous remercie d'avance, pour infos, je suis sous windows SP3..
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38 #include <SFML/System.hpp> #include <SFML/Window.hpp> #include <SFML/Graphics.hpp> #include <iostream> int main(void) { sf::RenderWindow myApp(sf::VideoMode(800, 600, 32), "Test 1234"); // Create the main rendering window while (myApp.IsOpened()) // Start game loop { sf::Event Event; // Process events while (myApp.GetEvent(Event)) { // Close window : exit if (Event.Type == sf::Event::Closed) myApp.Close(); // A key has been pressed if (Event.Type == sf::Event::KeyPressed) { if (Event.Key.Code == sf::Key::Escape)// Escape key : exit myApp.Close(); if (Event.Key.Code == sf::Key::F1) // F1 key : capture a screenshot { sf::Image Screen = myApp.Capture(); Screen.SaveToFile("screenshot.jpg"); } } } //myApp.Clear(sf::Color(200, 0, 0)); // Clear the screen with red color //myApp.Clear(); // Display window contents on screen myApp.Display(); } return (EXIT_SUCCESS); }
Cordialement,
NeoKript
Partager