But with the main window class they use (sf::RenderWindow) I haven't found a way to declare it for the whole class, then initialize it within the init function (or the constructor, for that matter)
Here's what I've tried so far, but I've just been stumbling around in the dark, to be honest:
class Game {
public:
Game(int Width, int Height, std::string title) {
App(sf::VideoMode(Width, Height), title.c_str()); // I've tried this
App = sf::RenderWindow(sf::VideoMode(Width, Height), title.c_str()); // This
App.RenderWindow(sf::VideoMode(Width, Height), title.c_str()); // And this (not at once, of course)
}
private:
sf::RenderWindow App;
...
};
So that's what I've tried so far, and I can't really think of anything else.
As you can probably tell I'm still very much an amateur to C++, so please help someone just getting back to C++.
Source for the RenderWindow class: http://www.sfml-dev....8hpp_source.php
Thank you!
~Crockeo

New Topic/Question
Reply




MultiQuote







|