mercredi 2 mars 2016

RAII issue regarding resource manager class

I have a SDL_Window wrapper class called WindowHandler as a class member in my Game class. Preferably, I would like to initialize the WindowHandler in my Game::init method. However, the class does not have a 0-param ctor, so the program will break if I don't initialize the WindowHandler variable in an initialization list. Is there a way to delay the initialization to the Game::init method?

Aucun commentaire:

Enregistrer un commentaire