There is an implicit construction with no parameters whenever you have fields in a class. If you want to initialize the fields using a non-default constructor, you have to use initializers, like so:
Game::Game(int argc, char **argv) : logger(),
stage(fileName),
engine(stage.getWidthPx(),
stage.getHeightPx(),
bitsPerPixel,
stage.getTimeStep())
{
/* remainder of constructor here */
}
Except that this won't likely work since you probably did some work inside the constructor to initialize fileName
and bitsPerPixel
. But this is the problem you are encountering. How you address it is up to you.
Every constructor must call a constructor for each of the fields in the class. If you don't specify which constructor, it will be the default. You could, however, make the fields pointers to the objects. Then they can initialize to NULL and you can create them with new inside the constructor.