SFML community forums
Help => General => Topic started by: samtheman on May 16, 2018, 01:40:01 am
-
// I am getting a bunch of errors when I run this project and I do not know where to start to start fixing them
// If anyone can please give me some advice on how setup this project-up or tell me something I would more then be happy.
Thanks,
// If I can get a little help from someone of how to fix some of these errors, or what best to try? maybe then I hope to get a little better with a project in SFML.
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow windows(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;
}
-
The code works fine. Since you don't provide any error message, how should we exactly be able to help you?
-
your brackets don't line up, match up at all
try the first example here
https://www.sfml-dev.org/tutorials/2.5/graphics-draw.php
-
Hehe, didn't even see that, but honestly if you want to program in C++ you should be able to figure out such a compiler error on your own... ::)