O_o
This is going to be my entire program then...
Movement.h
#include <SFML/Graphics.hpp>
#include <iostream>
#include <SFML/Audio.hpp>
#pragma once
class Movement
{
public:
Movement(void);
sf::RectangleShape player;
~Movement(void);
private:
float gravity;
};
Movement.cpp
#include "Movement.h"
#include <SFML/Graphics.hpp>
#include <iostream>
#include <SFML/Audio.hpp>
Movement::Movement()
{
sf::RectangleShape player(sf::Vector2f(40.f, 40.f));
player.setOrigin(20.f, 20.f);
player.setPosition(400.f, 40.f);
player.setFillColor(sf::Color(10, 30, 180));
float gravity = 980;
}
main.cpp
#include "Movement.h"
#include <SFML/Graphics.hpp>
#include <iostream>
#include <SFML/Audio.hpp>
int main()
{
Movement MovementObj;
//Movement *MovementObj2 = new Movement;
sf::RenderWindow window(sf::VideoMode(800,600,32),"Winston the Fancy Dinosaur");
// Limit frame-rate
window.setFramerateLimit(60);
// Keep track of the frametime
sf::Clock frametime;
// Big floor
sf::RectangleShape floor(sf::Vector2f(800.f, 40.f));
floor.setPosition(0.f, 560.f);
floor.setFillColor(sf::Color(10, 180, 30));
// Small box
sf::RectangleShape box(sf::Vector2f(40.f, 40.f));
box.setPosition(500.f, 480.f);
box.setFillColor(sf::Color(10, 180, 30));
while(window.isOpen())
{
// Get delta time for frame-rate depended movement
float dt = frametime.restart().asSeconds();
// Event handling
sf::Event event;
while(window.pollEvent(event))
{
if(event.type == sf::Event::Closed)
{
window.close();
}
}
// Render
window.clear();
//window.draw(MovementObj.player);
window.draw(box);
window.draw(floor);
window.display();
}
}
That is all my program is now, still get the error