So I'm working on a tiny engine with my exploration into SFML. I currently am using a WindowManager class. Here is my code.
void setWindow(int x, int y, std::string title)
window.create(sf::VideoMode(x, y, 32), title, sf::Style::Titlebar | sf::Style::Close);
If you take a look at the inheritance diagram for
You'll notice that it inherits from
sf::NonCopyable. So you can't return a copy of it... because its copy constructor and assignment operator are private.
What you can instead do is either return an
sf::RenderWindow&, or an
sf::RenderWindow*, or a
std::shared_ptr<sf::RenderWindow>, or ...