Why's my vector element all garbage?
问题 I have a GameLobby class that keeps a list of the currently active games. I want to fetch the active games from a GameLobby (singleton) object, and display these to the user. (Disclaimer: I'm pretty new to C++, so the following code isn't exactly stellar. Neither is it the complete code, but I feel confident that all the relevant instructions have been included.) First some definitions class GamesMenu : public MyGameLayer { private: std::vector<Game*>* _activeGames; void displayGamesList();