Inside of my player.h file:
class Player
{
private:
sf::RenderWindow App;
...
//
public:
Player(sf::RenderWindow App);
...
//
};
Inside of my player.cpp file:
Player::Player(sf::RenderWindow getApp)
{
App = getApp;
...
}
Inside of my main.cpp file:
int main(int argc, char** argv)
{
sf::RenderWindow App(sf::VideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP), "Hey There!");
Player player(App);
...
}
However, a large amount of issues are reported:
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Window.hpp:40:0,
from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Graphics.hpp:32,
from player.h:1,
from player.cpp:1:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/System/NonCopyabl
e.hpp: In member function 'sf::Window& sf::Window::operator=(const sf::Window&)'
:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/System/NonCopyabl
e.hpp:79:18: error: 'sf::NonCopyable& sf::NonCopyable::operator=(const sf::NonCo
pyable&)' is private
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Window/Window.hpp
:57:1: error: within this context
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Graphics.hpp:39:0,
from player.h:1,
from player.cpp:1:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/RenderWi
ndow.hpp: In member function 'sf::RenderWindow& sf::RenderWindow::operator=(cons
t sf::RenderWindow&)':
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/RenderWi
ndow.hpp:44:1: note: synthesized method 'sf::Window& sf::Window::operator=(const
sf::Window&)' first required here
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Graphics/RenderTexture.hpp:32:0,
from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Graphics.hpp:38,
from player.h:1,
from player.cpp:1:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/System/NonCopyabl
e.hpp: In member function 'sf::RenderTarget& sf::RenderTarget::operator=(const s
f::RenderTarget&)':
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/System/NonCopyabl
e.hpp:79:18: error: 'sf::NonCopyable& sf::NonCopyable::operator=(const sf::NonCo
pyable&)' is private
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/RenderTa
rget.hpp:48:1: error: within this context
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Graphics.hpp:37:0,
from player.h:1,
from player.cpp:1:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/System/NonCopyabl
e.hpp: In member function 'sf::Renderer& sf::Renderer::operator=(const sf::Rende
rer&)':
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/System/NonCopyabl
e.hpp:79:18: error: 'sf::NonCopyable& sf::NonCopyable::operator=(const sf::NonCo
pyable&)' is private
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/Renderer
.hpp:49:1: error: within this context
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/Renderer
.hpp:49:1: error: non-static reference member 'sf::RenderTarget& sf::Renderer::m
yTarget', can't use default assignment operator
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Graphics/RenderTexture.hpp:32:0,
from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Graphics.hpp:38,
from player.h:1,
from player.cpp:1:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/RenderTa
rget.hpp: In member function 'sf::RenderTarget& sf::RenderTarget::operator=(cons
t sf::RenderTarget&)':
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/RenderTa
rget.hpp:48:1: note: synthesized method 'sf::Renderer& sf::Renderer::operator=(c
onst sf::Renderer&)' first required here
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Graphics.hpp:39:0,
from player.h:1,
from player.cpp:1:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/RenderWi
ndow.hpp: In member function 'sf::RenderWindow& sf::RenderWindow::operator=(cons
t sf::RenderWindow&)':
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/RenderWi
ndow.hpp:44:1: note: synthesized method 'sf::RenderTarget& sf::RenderTarget::ope
rator=(const sf::RenderTarget&)' first required here
player.cpp: In constructor 'Player::Player(sf::RenderWindow)':
player.cpp:5:8: note: synthesized method 'sf::RenderWindow& sf::RenderWindow::op
erator=(const sf::RenderWindow&)' first required here
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Window.hpp:40:0,
from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Graphics.hpp:32,
from main.cpp:1:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/System/NonCopyabl
e.hpp: In copy constructor 'sf::Window::Window(const sf::Window&)':
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/System/NonCopyabl
e.hpp:67:5: error: 'sf::NonCopyable::NonCopyable(const sf::NonCopyable&)' is pri
vate
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Window/Window.hpp
:57:1: error: within this context
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Graphics.hpp:39:0,
from main.cpp:1:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/RenderWi
ndow.hpp: In copy constructor 'sf::RenderWindow::RenderWindow(const sf::RenderWi
ndow&)':
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/RenderWi
ndow.hpp:44:1: note: synthesized method 'sf::Window::Window(const sf::Window&)'
first required here
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Graphics/RenderTexture.hpp:32:0,
from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Graphics.hpp:38,
from main.cpp:1:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/System/NonCopyabl
e.hpp: In copy constructor 'sf::RenderTarget::RenderTarget(const sf::RenderTarge
t&)':
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/System/NonCopyabl
e.hpp:67:5: error: 'sf::NonCopyable::NonCopyable(const sf::NonCopyable&)' is pri
vate
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/RenderTa
rget.hpp:48:1: error: within this context
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Graphics.hpp:37:0,
from main.cpp:1:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/System/NonCopyabl
e.hpp: In copy constructor 'sf::Renderer::Renderer(const sf::Renderer&)':
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/System/NonCopyabl
e.hpp:67:5: error: 'sf::NonCopyable::NonCopyable(const sf::NonCopyable&)' is pri
vate
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/Renderer
.hpp:49:1: error: within this context
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Graphics/RenderTexture.hpp:32:0,
from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Graphics.hpp:38,
from main.cpp:1:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/RenderTa
rget.hpp: In copy constructor 'sf::RenderTarget::RenderTarget(const sf::RenderTa
rget&)':
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/RenderTa
rget.hpp:48:1: note: synthesized method 'sf::Renderer::Renderer(const sf::Render
er&)' first required here
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/
SFML/Graphics.hpp:39:0,
from main.cpp:1:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/RenderWi
ndow.hpp: In copy constructor 'sf::RenderWindow::RenderWindow(const sf::RenderWi
ndow&)':
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/SFML/Graphics/RenderWi
ndow.hpp:44:1: note: synthesized method 'sf::RenderTarget::RenderTarget(const sf
::RenderTarget&)' first required here
main.cpp: In function 'int main(int, char**)':
main.cpp:26:19: note: synthesized method 'sf::RenderWindow::RenderWindow(const s
f::RenderWindow&)' first required here
main.cpp:26:19: error: initializing argument 1 of 'Player::Player(sf::RenderWi
ndow)'
What could the issue be? Thanks for any assistance!
Also, the ... symbolizes that I took out pieces of irrelevant code.