Hello!
So i get these folling errors when i try and run my program:
c:\users\axel\downloads\sfml-2.2\include\sfml\window\window.hpp(521): error C2248: 'sf::NonCopyable::NonCopyable' : cannot access private member declared in class 'sf::NonCopyable'
1> c:\users\axel\downloads\sfml-2.2\include\sfml\system\noncopyable.hpp(67) : see declaration of 'sf::NonCopyable::NonCopyable'
1> c:\users\axel\downloads\sfml-2.2\include\sfml\system\noncopyable.hpp(42) : see declaration of 'sf::NonCopyable'
1> This diagnostic occurred in the compiler generated function 'sf::Window::Window(const sf::Window &)'
1>c:\users\axel\downloads\sfml-2.2\include\sfml\graphics\rendertarget.hpp(419): error C2248: 'sf::NonCopyable::NonCopyable' : cannot access private member declared in class 'sf::NonCopyable'
1> c:\users\axel\downloads\sfml-2.2\include\sfml\system\noncopyable.hpp(67) : see declaration of 'sf::NonCopyable::NonCopyable'
1> c:\users\axel\downloads\sfml-2.2\include\sfml\system\noncopyable.hpp(42) : see declaration of 'sf::NonCopyable'
1> This diagnostic occurred in the compiler generated function 'sf::RenderTarget::RenderTarget(const sf::RenderTarget &)'
When i cut down the code to the one i show below, i found out its because i passed a pointer in a function:
//Note: this is obviously cut down
int main()
{
sf::RenderWindow mainWindow;
mainWindow.create(sf::VideoMode(1024, 768), "A window");
show(mainWindow);
}
void show(sf::RenderWindow window)
{
..
getMenuResponse(window);
..
}
void getMenuResponse(sf::RenderWindow window)
{
..
}
My question is what i can do to prevent this.