fork download
  1. #include <SFML/Graphics.hpp>
  2. #include <iostream>
  3.  
  4. #define SCREEN_WIDTH 1024
  5. #define SCREEN_HEIGHT 1024
  6.  
  7. int main()
  8. {
  9. sf::RenderWindow window(sf::VideoMode(SCREEN_WIDTH, SCREEN_HEIGHT), "Awesome Game");
  10.  
  11. while (window.isOpen())
  12. {
  13. sf::Event event;
  14.  
  15. while (window.pollEvent(event))
  16. {
  17. switch (event.type)
  18. {
  19. case sf::Event::Closed:
  20. window.close();
  21.  
  22. break;
  23.  
  24. }
  25. }
  26.  
  27. window.clear();
  28.  
  29. // objects to draw
  30.  
  31. window.display();
  32. }
  33. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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
stdout
Standard output is empty