#include <iostream>
#define SCREEN_WIDTH 1024
#define SCREEN_HEIGHT 1024
int main()
{
sf::RenderWindow window(sf::VideoMode(SCREEN_WIDTH, SCREEN_HEIGHT), "Awesome Game");
while (window.isOpen())
{
while (window.pollEvent(event))
{
switch (event.type)
{
window.close();
break;
}
}
window.clear();
// objects to draw
window.display();
}
}
I2luY2x1ZGUgPFNGTUwvR3JhcGhpY3MuaHBwPgojaW5jbHVkZSA8aW9zdHJlYW0+CgojZGVmaW5lIFNDUkVFTl9XSURUSCAxMDI0CiNkZWZpbmUgU0NSRUVOX0hFSUdIVCAxMDI0CgppbnQgbWFpbigpCnsKCXNmOjpSZW5kZXJXaW5kb3cgd2luZG93KHNmOjpWaWRlb01vZGUoU0NSRUVOX1dJRFRILCBTQ1JFRU5fSEVJR0hUKSwgIkF3ZXNvbWUgR2FtZSIpOwoKCXdoaWxlICh3aW5kb3cuaXNPcGVuKCkpCgl7CgkJc2Y6OkV2ZW50IGV2ZW50OwoKCQl3aGlsZSAod2luZG93LnBvbGxFdmVudChldmVudCkpCgkJewoJCQlzd2l0Y2ggKGV2ZW50LnR5cGUpCgkJCXsKCQkJY2FzZSBzZjo6RXZlbnQ6OkNsb3NlZDoKCQkJCXdpbmRvdy5jbG9zZSgpOwoKCQkJCWJyZWFrOwoKCQkJfQoJCX0KCgkJd2luZG93LmNsZWFyKCk7CgoJCS8vIG9iamVjdHMgdG8gZHJhdwoKCQl3aW5kb3cuZGlzcGxheSgpOwoJfQp9
Main.java:1: error: illegal character: '#'
#include <SFML/Graphics.hpp>
^
Main.java:1: error: class, interface, or enum expected
#include <SFML/Graphics.hpp>
^
Main.java:2: error: illegal character: '#'
#include <iostream>
^
Main.java:4: error: illegal character: '#'
#define SCREEN_WIDTH 1024
^
Main.java:5: error: illegal character: '#'
#define SCREEN_HEIGHT 1024
^
Main.java:11: error: class, interface, or enum expected
while (window.isOpen())
^
Main.java:15: error: class, interface, or enum expected
while (window.pollEvent(event))
^
Main.java:22: error: class, interface, or enum expected
break;
^
Main.java:24: error: class, interface, or enum expected
}
^
Main.java:31: error: class, interface, or enum expected
window.display();
^
Main.java:32: error: class, interface, or enum expected
}
^
11 errors