Constructors

Is it better to use a constructor initialisation list

FBullCowGame::FBullCowGame(): MyCurrentTry(1), MyMaxTries(5) {
//MyCurrentTry = 1;
//MyMaxTries = 5;
}

Rather than initialise in body of constructor?

1 Like

Should be just preference of style, don’t believe there’s a difference.

1 Like

Privacy & Terms