Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: This is the project in the SFML Tutorial:  (Read 2349 times)

0 Members and 1 Guest are viewing this topic.

samtheman

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
This is the project in the SFML Tutorial:
« 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;
}
« Last Edit: May 16, 2018, 03:57:41 am by samtheman »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: This is the project in the SFML Tutorial:
« Reply #1 on: May 16, 2018, 07:35:09 am »
The code works fine. Since you don't provide any error message, how should we exactly be able to help you?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

jamesL

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Re: This is the project in the SFML Tutorial:
« Reply #2 on: May 16, 2018, 08:34:59 am »
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

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: This is the project in the SFML Tutorial:
« Reply #3 on: May 16, 2018, 08:38:58 am »
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... ::)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/