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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - YouAgain

Pages: [1]
1
Graphics / window is not a member of sf::Window
« on: January 26, 2015, 05:22:59 am »
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Main.hpp>
#include <SFML/System.hpp>
#include <SFML/Audio.hpp>
#include <SFML/Network.hpp>
#include "character.h"
#include "Voids.h"
int main()
{   
   //Window definitions
   sf::Window window(sf::VideoMode(800, 600), "My window");
   window.setPosition(sf::Vector2i(10, 50));
   window.setSize(sf::Vector2u(640, 480));
   window.setTitle("SFML window");
   sf::Style::None;
   sf::Style::Titlebar;
   sf::Style::Resize;
   sf::Style::Close;
   sf::Style::Fullscreen;
   sf::Style::Default;
   //Window definitions

   //textures
   sf::Texture warrior;
   if (!warrior.loadFromFile("download.png"))
   {
      //error
   }
   sf::Texture rouge;

   sf::Texture mage;

   sf::Texture archer;
   //textures

   //sprites
   sf::Sprite warrior1;
   warrior1.setTexture(warrior);
   sf::Sprite rouge1;

   sf::Sprite mage1;

   sf::Sprite archer1;
   //sprites


   //Framerate
   window.setFramerateLimit(60);
   //Framerate

   //While window open
   while (window.isOpen()){

      //Close window function
      sf::Event event;
      while (window.pollEvent(event)){

         if (event.type == sf::Event::Closed)
            window.close();
      }
      //Close window function

      window.

      //
      window.display();

   }
   //While the window is open

   return 0;
}




And yea thats my problem I don't really get why its popping up since I included everything there is to include and window does have some functions like "Window.display()"

Please help

Pages: [1]