3
« on: February 23, 2010, 02:05:59 pm »
I'm currently trying to put together an object manager class for game which has an update method which draws each of the sprites in the game. In order to do this, I needed an sf::RenderWindow object to be passed to my object manager and then draw each sprite.
However, when I pass my window I get the following error:
error C2248: 'sf::NonCopyable::operator =' : cannot access private member declared in class 'sf::NonCopyable'
I made sure that only references were being passed, but the same error still occurs, which I thought to be odd considering a reference isn't an actual copy.
int main()
{
// Create main window
sf::RenderWindow App(sf::VideoMode(800, 600), "SFML Pong", sf::Style::Fullscreen);
ObjManager OMan(App);
ObjManager::ObjManager(sf::RenderWindow& App)
{
}
Sorry if I've made some rookie errors here, I'm still a relatively new programmer, and I've just started getting into using libraries like SFML in order to implement graphics into my games.