1
Graphics / simple private variable call problem
« on: March 28, 2011, 07:59:51 pm »
hi im not sure if im just being a massive noob but im just trying to call a variable from my header and it just wont recognize it exists, what is it im doing stupidly wrong? and if possible could someone rearrange my code OR explain whats wrong. again bit of a noob.
game.h
game.cpp
game.h
Code: [Select]
#include <SFML/Graphics.hpp>
#pragma once
class game{
private:
sf::View view;
public:
game();
~game();
void initialise(sf::RenderWindow& App);
void update(sf::RenderWindow& App);
void render(sf::RenderWindow& App);
};
game.cpp
Code: [Select]
#include "game.h"
game::game(){}
game::~game(){}
void game::initialise(sf::RenderWindow& App){}
void game::update(sf::RenderWindow& App){
float Offset = 200.f * App.GetFrameTime();
view.Move(0, -Offset);
}
void game::render(sf::RenderWindow& App){}