Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualBaneTrapper

Posted 02 October 2012 - 02:09 PM

Hello.
I just downloaded visual studio 2010, so i am kind of new to it.
There is a test program to check if its just working.
But the title of the window is all wrong, and each run gives different resault,
i got these results from 3 runs of the program ("En", "E{", "E3") as the name of the window

Any ideas what i did wrong, cause i redone all linking and stuff, still getting error/title name being wrong.

EDIT:: i did download SFML 2.0 for visual studio 2010

#include <SFML/Graphics.hpp>
int main()
{
	sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
	sf::CircleShape shape(100.f);
	shape.setFillColor(sf::Color::Green);
	while (window.isOpen())
	{
		sf::Event event;
		while (window.pollEvent(event))
		{
			if (event.type == sf::Event::Closed)
				window.close();
		}
		window.clear();
		window.draw(shape);
		window.display();
	}
	return 0;
}

#1BaneTrapper

Posted 02 October 2012 - 02:05 PM

Hello.
I just downloaded visual studio 2010, so i am kind of new to it.
There is a test program to check if its just working.
But the title of the window is all wrong, and each run gives different resault,
i got these results from 3 runs of the program ("En", "E{", "E3") as the name of the window

Any ideas what i did wrong, cause i redone all linking and stuff, still getting error/title name being wrong.

#include <SFML/Graphics.hpp>
int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);
    while (window.isOpen())
    {
	    sf::Event event;
	    while (window.pollEvent(event))
	    {
		    if (event.type == sf::Event::Closed)
			    window.close();
	    }
	    window.clear();
	    window.draw(shape);
	    window.display();
    }
    return 0;
}

PARTNERS